Matthew Mosner, 27, of Somersworth, New Hampshire. Credit: York Police Department

A New Hampshire man was arrested early Wednesday morning after he allegedly robbed a Maine Rite Aid where he was employed as a temporary worker.

Matthew Mosner, 27, was arrested for being a fugitive from justice about 12 a.m. in Somersworth, New Hampshire, according to the York Police Department. He faces a robbery charge.

Mosner is accused of going up to a clerk at the Rite Aid on Route 1 in York about 10:13 p.m. and demanding money. Mosner told the clerk he had a gun and then made off with an undisclosed amount of money, according to York police.

York police said that Mosner was a worker from a temporary agency employed at the Rite Aid while it converted to a Walgreens. There were a number of workers from the agency outside the store at the time of the robbery, and Mosner was quickly identified as a suspect, York police said.

He was being held at the Strafford County Jail in New Hampshire while he awaits extradition to Maine.