SKOWHEGAN — A man who went to prison for armed robbery at a credit union in Madison in 2008 was arrested this week at the institution’s Skowhegan branch as he tried to get a loan to pay court-ordered restitution for the robbery.

Joshua Lieberman, 21, of Skowhegan was arrested Monday, charged with violating the conditions of his bail and probation by entering one of the Franklin Somerset Federal Credit Union’s four offices.

District Attorney Evert Fowle said the bail and probation violations are not the first by Lieberman since his release from prison on the robbery conviction. Three times in 2009 and 2010, Lieberman violated his probation by possessing marijuana. He was sent back to jail twice.

On his third violation, in October, his probation officer filed a motion in court to force Lieberman to pay the restitution from the robbery.

“It’s clear that probation isn’t doing Mr. Lieberman any good,” Fowle said Tuesday. “Our position will be that he should do significant prison time. I don’t think he gets it.”

Fowle said his office argued in October that Lieberman should be held without bail, but a judge released him.

Lieberman was taken into custody Monday afternoon at the credit union’s Skowhegan branch after a teller recognized him from the robbery, police said Tuesday.

“He said he just didn’t realize it was same corporation,” said Skowhegan police Officer Ronnie Blodgett. “That just doesn’t even sound right, that he went back to the institution that he stole from to get a loan to pay off what he owed them.”

Lieberman was convicted of armed robbery and sentenced in December 2009 to serve eight years in the state prison, with all but one year suspended, and three years of probation once he was released. Police said he was the driver of the getaway car in the robbery.

Lieberman also was ordered to pay $2,500 restitution.

Fowle said Lieberman has about seven years left to serve on his suspended sentence.