BAR HARBOR, Maine — A 23-year-old man was arrested early Friday after allegedly attempting to rob a man outside a convenience store.

Daniel Staley of Newtown, Pa., was charged with attempted robbery and assault, Bar Harbor police reported. Staley, who has been working in the area for the summer, according to police, was transported to the Hancock County Jail.

Police were summoned to the Big Apple convenience store on Cottage Street shortly after 1 a.m. Officers who arrived on the scene were flagged down by several people outside the store, said a police spokeswoman. They told police a man had been assaulted by another man who tried to take money out of the victim’s pocket. Staley was subsequently arrested at the scene.

The victim, who was not identified, suffered minor facial injuries, police said.

Staley was being held under a $1,000 cash bail pending an afternoon court appearance.