WASHINGTON—A woman described as “erratic and aggressive” drove a vehicle into a U.S. Capitol Police cruiser and was taken into custody Wednesday morning, a disruption that closed down streets near the Capitol for nearly three hours.

Shots were fired during the arrest attempt, but the event appeared to be criminal in nature with “no nexus to terrorism,” said Capitol Police spokeswoman Eva Malecki. No one was injured. She said the U.S. Capitol remained open.

Malecki described the woman as an “erratic and aggressive driver.” As police attempted to stop her, she made a U-turn and fled, nearly hitting officers and striking at least one other vehicle, Malecki said. A brief pursuit followed before the woman was stopped.

The chase took place near the U.S. Botanic Garden. Malecki said shots were fired “during the attempt to arrest the suspect,” but she declined to say how many shots were fired or to elaborate further.

The disruption happened near the end of the morning rush hour and prompted a large police response just as lines of people were waiting to get into a nearby congressional office building. Streets near the Capitol were closed, and the Sergeant at Arms advised lawmakers and staff to stay away from the area. The streets reopened nearly three hours later.

Scott Ferson, president of Liberty Square Group, a Boston-based communications firm, said he suddenly saw a dozen Capitol Police cars moving quickly toward the Botanic Garden. Ferson said he heard what sounded like three gunshots.

“I heard pop, pop, pause, pop and I said ‘Oh, that was gunfire,’” he said in a phone interview. Police told everyone in the area to get off the street, but then things seemed to calm down and Ferson headed to his meeting.

Almost exactly one year ago, U.S. Capitol Police shot a man after he pulled a weapon at a U.S. Capitol checkpoint as spring tourists thronged Washington. The suspect was previously known to police, who had arrested him in October 2015 for disrupting House of Representatives proceedings and yelling he was a “Prophet of God.”

In 2013, Miriam Carey, a 34-year-old dental hygienist from Connecticut, was shot and killed by Capitol Police officers in her vehicle outside the Hart Senate Office Building. Officers had pursued Carey from the White House, where she made a U-turn at a security checkpoint. Her young daughter was inside the car at the time and was unharmed. Her family filed a wrongful-death lawsuit against the Secret Service and Capitol Police.