SAN FRANCISCO (CBS SF) — Officers have taken an armed female suspect into custody, after she had barricaded herself inside a Valencia Street apartment earlier in the day, police said.

The incident began at about 1:55 p.m. in the 500 block of Valencia Street, when police responded to a report of a person with a gun, according to police.

Police attempted to negotiate with the suspect but she refused to come out.

By about 9:05 p.m., the suspect stepped into the building’s hallway and was taken into custody. She was then taken to a hospital for evaluation, police said.

Afterward, the police’s Special Operations Bureau checked the apartment for weapons and anything that may have been hazardous.

Valencia Street was closed between 16th and 17th streets, and residents had been asked to shelter in place. Valencia Street is set to reopen and the shelter in place is being lifted, according to police.

The initial call came in after someone doing pest control work in the building went to an apartment. The apartment’s resident then pulled out a gun and the exterminator fled, police said.

The building was identified as the Crown Hotel.

The lockdown area was later expanded to stretch across three blocks of Valencia from 18th Street to 15th Street.

Officers with shields escorted people who were at cafes and restaurants on the block to safety as the negotiations continued.

People who were affected by the shelter-in-place order posted photos and video to social media.

We were evacuated from Valencia, pretty orderly until we got outside and had to run. A few blocks away now and safe pic.twitter.com/Ia3DVk8biy — Rebecca Pierce (@aptly_engineerd) March 10, 2017

TM and © Copyright 2017 CBS Radio Inc. and its relevant subsidiaries. CBS RADIO and EYE Logo TM and Copyright 2017 CBS Broadcasting Inc. Used under license. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed. Bay City News contributed to this report