BANGOR, Maine — A New Hampshire woman was sentenced Tuesday in U.S. District Court to three years in prison for her role in armed robberies at a New Hampshire bank and a Maine credit union last year.

Crystal Dufault, 34, of Manchester, New Hampshire, also was sentenced to five years of supervised release and ordered to pay more than $25,500 in restitution. The money was spent on drugs and given away, according to court documents.

Dufault pleaded guilty in January to one count each of bank robbery and conspiracy to commit bank robbery in connection with armed robberies at Franklin Savings Bank in Franklin, New Hampshire, on Aug. 14, 2015, and the University Credit Union in Portland on Sept. 4, 2015.

She admitted to driving the getaway car for the August robbery and wielding a pellet gun during the September one, according to court documents. Dufault robbed both banks with Joseph Richards, 47, of Manchester, New Hampshire.

Dufault’s attorney, Joel Vincent of Portland, on Tuesday urged U.S. District Judge Nancy Torresen to impose a sentence below the recommended sentence of between five and 6½ years because of her difficult childhood and her substance abuse issues. He also said that Dufault was homeless and addicted to drugs when Richards took her in and convinced her to take part in the robberies.

Richards was sentenced last month to 15 years in prison for robbing those two banks and two others with Neil West Sr., 65, of Portland. He is incarcerated at a federal detention center in Brooklyn, New York, according to the U.S. Bureau of Prisons’ Inmate Locator site.

West, who was released in May 2015 after being sentenced to 41 months in prison for being an accessory after the fact to a robbery of a bank in Wells nearly four years ago, was convicted by a jury in July of armed bank robbery and conspiracy to commit robbery.

He drove the getaway car for armed robberies in Freeport and Lewiston committed by Richards, according to court documents. West’s sentencing date has not been set.

The maximum sentence for armed bank robbery is 25 years in federal prison.