A Gardiner man who robbed the Osco Pharmacy in Augusta twice in two days last fall was sentenced Thursday in U.S. District Court in Bangor to serve 37 months in federal prison.

Ryan J. McLaughlin, 27, pleaded guilty before Judge D. Brock Hornby on April 17 to two counts of interfering with commerce by robbery.

McLaughlin was first arrested by FBI agents in Portland on unrelated warrants Nov. 14, a day after the second robbery, and the robbery charges were added shortly thereafter. He has remained in custody since then.

The Osco Pharmacy at the Shaw’s supermarket on Western Avenue was robbed shortly after noon on both Nov. 11 and Nov. 13.

The description of the robber and manner of the crimes in each case were identical. In both cases, McLaughlin passed a note to employees, demanded oxycodone and fled with the drugs.

At the time of the robberies, Augusta police were already seeking McLaughlin in connection with at least one burglary, according to state court filings.

Augusta police identified McLaughlin based on tips from the public after the Kennebec Journal ran a photo of the robber.

Investigators then tracked McLaughlin and his girlfriend through acquaintances to a Portland hotel where they were staying, and joined the FBI to arrest McLaughlin there.

An affidavit by Augusta police Detective Jason Cote, filed in November in Augusta District Court, outlined some of the evidence against McLaughlin. Cote had helped interview McLaughlin at the FBI office.

“McLaughlin confessed to both pharmacy robberies at Shaw’s in Augusta. He admitted he has a severe opiate addiction,” Cote wrote. “He stated that due to his severe addiction and no place to live, in mere desperation he decided to rob the Shaw’s pharmacy.”

In the federal court case, Hornby also sentenced McLaughlin to serve three years of supervised release following completion of his prison sentence. McLaughlin was also ordered to pay $1,996.30 in restitution.