A San Diego police dog was injured during a SWAT standoff at a Gaslamp Quarter apartment complex on Tuesday, and the suspect was taken into custody.

The standoff began around 7 a.m. when a woman — who said last Friday she had been hit over the head with a baseball bat — reported that the man she alleged assaulted her was in his apartment near Second and West Island avenues near San Diego Children’s Park.

Police arrived and learned the possibly armed man was inside his apartment, Officer Colin Steinbroner said.

Officers quickly evacuated the nearby apartments and established a perimeter around the building, hoping to get the suspect to leave the apartment, Steinbroner said. A SWAT unit was also dispatched to the scene.

During the incident, San Diego police asked residents and nearby commuters via social media to avoid the area due to the ongoing incident.

Heading into late Tuesday afternoon, officers decided to use less-lethal methods to remove the man from the apartment, dropping tear gas and sending a dog into the unit.

The cause and extent of the injuries to the police dog were not immediately known.

The man eventually left the apartment and was taken into custody soon after, Steinbroner said.

No other information about the incident was immediately available.