SAN DIEGO -- A San Diego officer accidentally shot himself in the leg Sunday while pursuing a hit-and-run suspect who pointed a weapon at police and was eventually arrested on the roof of a parking structure near the finish line of an annual marathon, authorities said. Officers fired at the woman but missed after she brandished the weapon at the parking facility at the edge of a downtown plaza shared by City Hall, police Chief David Nisleit told reporters.

The suspect, who police identified as 58-year-old Mona Elease Williams, threw the weapon from the top of the structure to the street below before being taken into custody, Nisleit said. It was unclear what type of weapon it was, but investigators were looking into whether it was a pellet gun that resembles the real thing, the chief said.

It was not immediately known if Williams had an attorney who could comment on her behalf.

Get Breaking News Delivered to Your Inbox

Detectives were also investigating whether Williams was connected to a kidnapping in nearby Chula Vista, Nisleit said. In that incident a man called police to report that he was bound and gagged at gunpoint but managed to escape, he said.

In announcing Williams' arrest, police said the scene was secure and there was no threat to the area near the San Diego Rock 'n' Roll Marathon, which brought thousands of people downtown along with a heavy police presence.

Runner Fabian Tabares, 49, finished the race for the second year in a row and then heard the news that an armed suspect was arrested only two blocks from the route.

"I'm surprised to hear that but since I'm slow, luckily I was not affected," he said, adding that it was a well-organized event and felt safe. "I'll be back next year to do it again."

The incident began shortly before 11 a.m. as a call about a hit-and-run, officials said. A number of streets were closed after police chased the woman driving a white sedan into the parking structure.

The chief said the wounded officer's gun accidentally discharged and the man was struck once in the lower leg. He's expected to fully recover. Officers fired at least two shots at the woman after she pointed the weapon at them, Nisleit said.

Initially, police received calls of an "active shooter" and said that the woman had fired her weapon, but Nisleit did not confirm that during a press briefing.

The race was halted for about 10 minutes and rerouted, marathon officials said.

Marathoner Beth Grew, 40, of Yuma, Arizona, said she had no idea the race was delayed. "Oh my God. That's so scary," she said after finishing and learning about the shooting.

Leilani Sandan and her 7-year-old son were playing music from "Les Miserables" on their way to see the musical at the San Diego Civic Theater when they were suddenly passed by more than a dozen police cars, sirens blaring. The shooting had just occurred in the parking garage they were headed to next to the theater.

"It was crazy," Sandan said as she stood with hundreds of other ticketholders behind police tape. "It was like police, police, police, siren, siren, siren."

She said she was glad to hear the marathon runners were OK. They were later escorted into the theater with the others, who shuffled past the yellow police tape.

Charlotte Behler said she was with her grandparents when police responded to the scene. They quickly ducked into a nearby restuarant where they remained for three hours.

"She kept us safe and well fed," Behler's grandmother, Janet, told The San Diego Union Tribune.

The 26.2-mile marathon course weaves its way through the city and also includes a half-marathon and a 5K run. Thousands of runners participated in the annual event.