A Livingston man who broke into a business and stole handguns — then used one of the guns to break into a pharmacy and steal hundreds of prescription pills — will spend three years in federal prison.

In sentencing Bradlee Scott Ledford, 27, on Wednesday in Billings, U.S. District Judge Susan Watters ran the three-year term consecutive to a state sentence of three years Ledford is serving after being revoked.

Watters also ordered Ledford to pay $4,303 restitution to Western Drug in Livingston where he stole about 470 prescription pills.

Ledford pleaded guilty in federal court in July to being a felon in possession of a firearm in a plea deal in which other counts were dismissed.

Watters, who sentenced Ledford near the high end of 30 to 37 month guideline range, said she ran the term consecutive to his state sentences, including a deferred sentence, because he continued a pattern of break-ins and thefts.

Ledford then sold items to support a substance abuse habit, including using opiates, Watters said. When opiates were not available, he used heroin, she said.

Ledford apologized and said he wanted to start a new chapter in his life.

Prosecutors said in court records that on Jan. 4, 2016, Ledford broke into Matt Long Photography Studio in Livingston and stole two handguns and $475. He then used one of the handguns to smash a window at Western Drug Store and Pharmacy and stole about 470 various prescription pills. A video surveillance camera recorded the burglary, and police officers recognized Ledford.

Replacement for the stolen drugs was $1,400, the prosecution said.

Ledford has a felony theft conviction in Yellowstone County and a burglary conviction in Gallatin County.