Christopher Reynolds, 52, pleaded guilty to two counts of bank robbery and will serve nearly 12 years in prison, prosecutors said.
The robberies occurred Nov. 6, 2007 at a Wells Fargo bank in San Francisco and Oct. 10, 2007 at an M&T Bank in Buffalo, N.Y., according to the U.S. Department of Justice.
During the San Francisco robbery in the city's Cow Hollow neighborhood, Reynolds, dressed in a black suit, tie and dark glasses, approached the bank manager with a fake badge and said he was with the Department of Justice.
He placed a leather briefcase on the manager's desk, said he had set an explosive device inside the bank, and told the manager not to call police because he had a partner outside with a detonator, prosecutors said.
Reynolds escaped with $9,230 after also telling the manager he had a gun and opening his jacket to reveal it.
The gun was actually a toy that Reynolds had painted black to resemble a real gun, prosecutors said.
They said Reynolds used the same technique during the earlier Buffalo robbery, where he got away with $21,000.
Reynolds was arrested by San Francisco police while trying to escape in a taxi, prosecutors said.
At the time of the robberies, he was already on supervised release for a 1998 bank robbery conviction, according to the Department of Justice.
Under the terms of the plea agreement, Reynolds is scheduled to be sentenced on Jan. 16 to 11 years and eight months in prison.