WISCASSET, Maine — A Jefferson man who shot a Labrador retriever with more than 100 BBs on several occasions while he was drunk was sentenced Thursday to serve eight months in county jail.

As part of a plea agreement arranged prior to Thursday’s court session, Aaron Armstrong, 33, who at the time lived in Waldoboro but now lists his residence as Jefferson, pleaded guilty to the Class C charge of aggravated cruelty to animals.

But on Thursday, Justice Jeffrey Hjelm refused to accept the plea agreement that would have limited Armstrong’s jail time to the 140 days he already had served.

The plea deal would have sentenced Armstrong to four years in jail with all but those 140 days suspended. Instead, Hjelm sentenced Armstrong to four years with all but eight months suspended, and two years probation. That means he will have to return to jail to serve the difference between eight months and the 140 days he already has served.

Armstrong also will have a lifetime ban on owning animals, will be unable to use or possess any type of firearm and must pay the Boothbay Animal Hospital $373 in restitution, among other conditions.

Characterizing his crime as “extraordinarily heinous,” Hjelm told Armstrong, “what you did to this animal … was absolute cruelty, nothing short of torture.”

Armstrong was arrested June 13, and indicted in September by a Lincoln County grand jury on a Class C charge of aggravated cruelty to animals. He pleaded guilty to the charge in November.

According to an affidavit submitted by Waldoboro police and included in court documents, officers went to Armstrong’s home on June 13, about 10 days after an abandoned puppy was found near Orffs Corner. A veterinarian’s examination of the dog revealed almost 100 BBs lodged in its body.

On Thursday, Lincoln County Assistant District Attorney Andrew Wright said 109 BBs were actually found in the dog’s body.

Armstrong allegedly later told Waldoboro police Detective Jason Benefield that “he shot the black Labrador behind his house or wherever the dog happened to be while he was extremely intoxicated,” the affidavit states. “He said the dog was not responding to training and when he drank he became angry with the dog.”

In February, Wright called Armstrong’s actions “pretty deplorable,” but said that as a Class C felony, the crime carried a maximum sentence of five years.

“Our ability to watch over him for a period of time and our ability to ban him for life from having animals and getting into a situation like this again is a very important part of what we’re doing,” he said.

Armstrong’s attorney, David Paris, told the judge that Armstrong had “essentially no criminal history,” and said Armstrong has “expressed remorse for his behavior. He attributed it mostly to substance abuse … and has acknowledged that it is shameful behavior.”

The dog has since been adopted and named Lady by South Bristol resident Peter Blanton, who said in February that Lady has turned out to be “a very loving dog” — if a little unruly.

Armstrong is scheduled to turn himself in to Two Bridges Regional Jail on May 1.