AUGUSTA — Thomas J. Lemay blurted out his confession to stealing guns and jewelry from a Belgrade home when a trooper stopped him Feb. 7 in Sidney for having an invalid inspection sticker on his truck.

The 30-year-old, who showed addresses in Monmouth and Wales, had been addicted to heroin for 13 years at that point, he told a judge Thursday at the Capital Judicial Center.

During the traffic stop, Lemay told Trooper Diane Vance that he was on probation, that he had syringes in the vehicle and that he had used heroin recently, according to Assistant District Attorney Alisa Ross. Vance located those items as well a stun gun.

Ross said Lemay approached Vance and told her, “I’m in trouble. I’m going to prison for a long time.”

Lemay said that a half-hour earlier he had broken into a Belgrade home and stolen firearms. Two rifles, a shotgun and a knife were found in his vehicle, as well as jewelry from the same McGrath Pond Road home, which police quickly identified because of a name on a bracelet.

When Lemay was interviewed formally shortly afterward, Ross said, “he confessed fully. He took responsibility. He said he woke up, used the last of drugs, drove around Belgrade and picked a house at random. He said he kicked a side door to get into house.” Lemay had been living in his truck at the time.

He also admitted to theft of stolen property for having another firearm a day earlier in Sidney, Ross said.

Lemay was prohibited from having firearms because he had been convicted of a number of felony burglaries in 2012 in Androscoggin and Sagadahoc counties and was still on probation for those.

When Justice Donald Marden asked him about confessing to the state trooper, Lemay said, “I knew it was over, your honor.”

After pleading guilty Thursday to burglary, theft by unauthorized taking, theft by receiving stolen property and illegal possession of a firearm by a prohibited person, Lemay was sentenced to serve an initial seven years in prison, with three more years suspended while he serves three years of probation. A consecutive five-year, all-suspended sentence and two years of probation was imposed for having the other firearm, which the prosecutor said Lemay had sold to a friend.

Lemay was ordered to pay $2,560 in restitution.

A separate charge of receiving stolen property — a television — in the period of Jan. 23 to Feb. 4, 2017, in Winthrop was dismissed in exchange for the plea.

In the 2012 cases, he and a co-defendant had been ordered to pay more than $25,000 in restitution.

Lemay hung his head and looked at his hands during much of Thursday’s hearing.

Lemay’s attorney, William Baghdoyan, said Lemay recently had spent some time in a substance abuse rehabilitation program, but he left it.

Betty Adams — 621-5631

[email protected]

Twitter: @betadams