YORK, England (AP) -- A man who broke into an animal shelter armed with a samurai sword and an air rifle to retrieve his dog was jailed for 15 months on Wednesday.

Paul Lovie, 47, broke into the shelter run by the Royal Society for the Prevention of Cruelty to Animals in York, northern England, in March to find his Jack Russell terrier.

Lovie was devastated when vets told him his pet was ill and needed to be euthanized, and he could not afford the bill.

Shelter officials confiscated the dog after Lovie was overheard saying he would "do it himself with a pickax," prosecutors said.

"He decided to take matters into his own hands and go and get the dog," prosecutor Dianne Campbell told the court. Once inside the shelter, Lovie, who also had lighter fluid and a hammer, called police and threatened staff.

Armed police arrived and Lovie surrendered after 90 minutes of negotiations.

He pleaded guilty to possessing a firearm with intent to cause fear or violence, having an offensive weapon and criminal damage.