A Portland man who used a wig to disguise his identity during the robberies of three credit unions and two banks last year was sentenced to 14 years in federal prison Monday.

Jimmy Odong, 26, was sentenced in U.S. District Court in Portland by Chief Judge Nancy Torreson, U.S. Attorney Thomas E. Delahanty II said in a news release. He was also ordered to pay $26,790 in restitution.

Delahanty said Odong’s crime spree began on May 14, 2015, when he robbed the University Credit Union in Portland. Odong also robbed TruChoice Federal Credit Union in Portland on May 26, 2015; CPort Credit Union and Bank of America, both in Portland, on June 19, 2015; and Key Bank in Freeport on July 17, 2015.

In each robbery, Odong was captured on bank security cameras wearing a hat or wig that partially disguised his appearance.

Odong showed a weapon during each robbery, in which he demanded that tellers hand over cash. The weapon appeared to be a gray or black semiautomatic handgun.

Odong has been in custody since late July 2015, when the FBI and Portland police arrested him after recovering a partial fingerprint of Odong’s from a stolen car he used in the Key Bank robbery.

Authorities said that on July 17, 2015, Odong approached a woman in a parking lot adjacent to the Seaside Nursing home on Baxter Boulevard in Portland, pointed a handgun at her, and ordered her to get out of her silver Honda Pilot SUV. She fled and her vehicle was later found abandoned in Yarmouth.

Before sentencing, Torreson said bank robberies such as these are extremely serious offenses, especially when a weapon is used. She said tellers and customers often suffer emotional trauma that stays with them long after the crime.

“Judge Torreson also told Odong that his crimes affected the entire banking industry in this area because no bank felt safe,” Delahanty said.

The investigation was conducted by the FBI and Freeport, Portland and Brunswick police, Maine State Police, and other state and federal law enforcement agencies.

“These bank robberies were quickly solved because local, state and federal law enforcement agencies worked closely together,” Delahanty said.