Ronald Tilley, 59, told a federal judge on Monday that he robbed the Down East Credit Union on March 27.
According to court documents, Tilley got away with just over $8,700 after he told the teller he had a gun and would shoot if the person didn't comply.
He then fled the state.
Tilley was picked up in Connecticut for shoplifting four days after the robbery, and was indicted a couple of days later in U.S. District Court in Bangor.
Tilley entered his guilty plea before Judge Lance Walker.
A sentencing date has not yet been set.
He faces up to 20 years in prison.