Constance Coombes, defending, told the sentencing hearing that Zaherali’s attempts to identify the officer online “had to be taken in context of her pet being shot in the street”.

“She was never trying to seek retribution or revenge. It was borne out of upset and grief,” she said.

Zaherali said Ghost’s death had been a “massive loss” to her family, adding that they felt they had been “fighting the world” to prove his innocence.

The 31-year-old was handed a £100 fine and a 24-month rehabilitation order, requiring 40 sessions with support services.

The sessions would focus on “personal wellbeing, current circumstances and support for the difficulties you have moving forward”, the judge told her.

While the prosecution had asked for £1,050 to be paid in costs for two trials, which they said had both been fully prepared despite just one having eventually gone ahead, Mr Spruce reduced that sum to £614.

He also declined a request from the prosecution to disqualify Zaherali from owning dogs.

South Yorkshire Police previously said the decision to shoot an animal was “never taken lightly”, but the safety of the community and officers “was always our priority”.