A law giving protection to service dogs and horses has been given Royal Assent.
The new legislation means causing unnecessary suffering to a service animal is now an offence in England and Wales.
It was inspired by German shepherd Finn, who was stabbed while trying to apprehend a man in Stevenage, Hertfordshire, in 2016.
Finn's handler PC Dave Wardell said he was "so happy Finn has gone down in history".
"What a legacy for the job he absolutely loved doing every day of his career," he said.
PC Wardell and Finn were both stabbed when trying to catch a man suspected of robbing a taxi driver at gunpoint.
The dog was stabbed in the chest and head but did not let go until reinforcements arrived. It was initially thought he was unlikely to survive but he recovered and was back on active duty 11 weeks later.
PC Wardell, who was knifed in the hand, credited Finn for saving his life.
But while the 16-year-old suspect was charged with actual bodily harm in relation to wounds to PC Wardell, he faced only criminal damage charges over the injuries to Finn.
Since then the police officer has been campaigning for an amendment to the Animal Welfare Act 2006.
MP for North East Hertfordshire Sir Oliver Heald was given permission to bring in the Animal Welfare (Service Animals) Bill in 2017.
PC Wardell said: "This has been an amazing journey and such a positive campaign to be part of. All this positivity came from such a negative event.
"I would like to thank every single person who has supported us through this. I can't believe we've made history."
Chief Constable Charlie Hall said what had happened to the pair was "etched in all our memories".
"After months of campaigning, it's great to see something so positive coming to fruition which recognises the importance of police dogs in our family," he said.
Sir Oliver said he was "delighted" the Bill now had Royal Assent and thanked everybody who had been involved.
A bill receives Royal Assent once it has completed all the parliamentary stages in both the House of Commons and the House of Lords, and when the Queen formally agrees to make the bill into an Act of Parliament and therefore the law.