SANTA ROSA (CBS SF) — A standoff at a Santa Rosa home that started early Thursday afternoon and lasted several hours ended with police taking the suspect into custody, police said.

The incident began around 1:35 p.m., when police ordered residents to shelter in place in the area of Dutton and West Barham avenues.

Around 8:10 p.m., police said officers were able to take the suspect safely into custody.

Residents in the area were being allowed to return home and roads that were closed in the area reopened, according to police.

Police believe the suspect, who has not been identified, is connected to an attempted armed robbery that occurred Tuesday at Harry’s Market at 501 W. Ninth St.

In that incident, a masked suspect entered the market shortly before midnight, pulled a shotgun from under his jacket and demanded cash from a clerk. When the clerk was unable to open the cash drawer, the suspect fired a shot and the clerk tried again to open the drawer before the suspect ran out of the market.

Police searched the area but did not locate the suspect. The clerk was not injured in the robbery attempt, police said.

© Copyright 2018 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed