BANGOR, Maine — A man convicted of robbing a city laundromat twice in a week last year was sentenced Tuesday at the Penobscot Judicial Center to nine years in prison.

David Alan Thiede, 62, of Bangor will serve the sentence at the same time he serves a three-year sentence in federal prison for violating his supervised release. After Thiede completes his federal sentence, he will be incarcerated in Maine to serve the remainder of the nine-year sentence.

Thiede pleaded no contest in December to both robberies.

No contest pleas result in convictions.

There was no plea agreement with the Penobscot County district attorney’s office in the case.

Thiede, who has a long criminal history, was released from federal prison in August 2015 after serving more than 15 years for robbing three banks at gunpoint and attempting to rob a fourth in January and February 2000, according to court documents.

He robbed the Gold Star Cleaners at Third and Union streets on Jan. 12 and 19, 2016, according to police. He walked into the business on both dates, put his right hand in his jacket pocket as if he had a weapon but did not display one, and demanded money.

A weapon was not recovered when Thiede was arrested.

The same clerk was working during both robberies, according to court documents. He gave Thiede $120 on Jan. 12 and $190 on Jan. 19.

On Tuesday, Penobscot County Deputy District Attorney Alice Clifford recommended a sentence of nine or 10 years.

Defense attorney Matthew Erickson of Brewer urged Superior Court Justice Ann Murray to impose a sentence of 10 years with all but 3½ years suspended, to be followed by four years of probation.

Thiede had been incarcerated, unable to post $50,000 cash bail since his arrest after the second robbery. He has been boarded at the Kennebec County Jail for about 10 months, participating in a program there designed for veterans.

Thiede told Murray that the veterans’ program, which includes substance abuse treatment, had helped him and allowed him to help others.

He faced up to 10 years in prison and a fine of up to $20,000 on the robbery charges.