A man has been accused of shooting another man in Boothbay Harbor and causing a 12-hour standoff with police.

Matthew Plummer, 40, of Boothbay Harbor was charged with aggravated attempted murder and violating his conditions of release from a similar 2018 standoff in Wiscasset, according to the Lincoln County Sheriff’s Office.

The shooting happened about 4:35 p.m. Sunday after witnesses saw Plummer allegedly armed with a gun and heard gunshots in the parking lot of the Campbell Creek apartment complex on Reed Road.

Before deputies arrived at the scene, the victim, a 34-year-old Wiscasset man, arrived at a local urgent care facility seeking treatment for gunshot wounds.

He was taken to the Lincoln Health before being airlifted to the Maine Medical Center in Portland. No information on his condition is available at this time.

Witnesses told police that Plummer had gone back into an apartment at Campbell Creek following the shooting and believed he was still inside.

A standoff ensued, and Plummer was finally arrested around 3 a.m., according to the sheriff’s office

He’s being held at Two Bridges Regional Jail in Wiscasset.

The investigation is ongoing.