A man has admitted shooting a police officer with a crossbow bolt before setting fire to his home.
Christopher Hutchison, 37, hit Sgt Stuart Morrison in the arm as he fired from a window at his house in Blantyre, South Lanarkshire, last October.
Armed officers were called to the scene after earlier reports of a disturbance while Hutchison and his partner were inside the property.
The house was near two schools, leading to the area being made "secure".
The High Court in Glasgow heard Hutchison was in "self-destruct mode" following the death of his father from cancer two days earlier.
Lady Rae warned him to expect a "significant" prison sentence when he returns to the dock next month.
The court heard police were initially called to the house on the morning of 24 October and Hutchison was spotted with a loaded crossbow.
Prosecutor Sean Smith QC said the weapon was described as powerful and capable of causing serious injury.
Mr Smith: "Firing bolts (from the crossbow) carried clear disregard for the safety of others."
Sgt Morrison was one of the armed officers outside the property.
He was 10m (33ft) away when Hutchison fired the crossbow, with a bolt going through a closed door and striking the officer. Fortunately, it only broke the skin on Sgt Morrison's arm.
A police negotiator was then called to try and calm Hutchison down.
But he continued to fire the crossbow out of a window onto the street.
At one point, he shouted that it was a "warning" to police. He eventually dropped the weapon after claiming he had run out of bolts.
Hutchison then yelled his "neighbours better be out" as he had petrol and was going to set his house on fire.
He went on to burn curtains in the lounge as well as an upturned bed in a room.
The court heard the blaze spread rapidly with the property badly damaged.
Both Hutchison and his partner were eventually taken out of the house.
Euan Dow, defending, said Hutchison's father had died two days before the crimes.
The advocate added Hutchison had a "very demanding role" as his father's carer and appeared to suffer a "bereavement breakdown" that day.
Mr Dow told the court: "In the morning in question, he was in self-destruct mode.
"It is clear - taking him at his word - that he did not care if he lived or died himself and appeared hell-bent in provoking the firearms officers."
Hutchison, who admitted assault and wilful fireraising, was remanded in custody and sentence was deferred.
Lady Rae told him: "These are very serious offences. A number of people - including yourself - are fortunate that you are not on more serious charges.
"While I appreciate there may have been bereavement issues, many people have them, but do not react the way you did."