PORTLAND, Maine — A Brunswick man pleaded guilty Wednesday to robbing the Bank of Maine on Maine Street in Brunswick in February. He was sentenced to six years in jail with all but two years suspended and two years of probation.

Benjamin Lamphere, 20, also pleaded guilty to four counts of misdemeanor criminal threatening, according to Cumberland County Assistant District Attorney Michael Madigan.

Chief Justice Roland A. Cole sentenced him to six months for each count, concurrent with the robbery sentence.

On Feb. 18, Bank of Maine employees reported to police that a white man in his mid-20s pointed a gun at a teller and demanded cash before fleeing on foot. Police did not disclose how much cash was taken. No one was injured during the incident.

Two days later, police released a photo of the robbery taken from security camera footage. Brunswick police arrested Lamphere on Feb. 24.

Madigan had asked for a 10-year sentence, with Lamphere to serve five years, but commended Cole for “balancing the seriousness of the crime with the opportunity to give Mr. Lamphere a chance at a successful, drug- and crime-free future.”

“This case is the most recent example of the problems facing our communities: drug addiction and the cost to the community, the families and the state,” Madigan said. “Drug abuse should never be cause for excusing criminal conduct, especially when the crime is solely for the purposes of continuing the drug habit.”