A San Diego police officer accidentally shot himself in the leg Sunday while pursuing a hit-and-run suspect who pointed a weapon at officers 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, identified by police 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.

She was booked on a charge of felony resisting arrest, police said. It was not immediately known if Williams had an attorney who could comment on her behalf.

Police said they initially suspected the woman might have been linked to a kidnapping investigation in Chula Vista, but later Sunday a department spokesman said the two incidents appeared to be unrelated.

In announcing the woman's 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. Organizers said there were 27,000 registered runners in the marathon and half-marathon.

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 he was struck once in the lower leg. He was 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 the nearby 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."

They were later escorted into the theater with the others, who shuffled past the yellow police tape.

Sara Wehr, 31, also was headed to the show with her family.

"It is a little nerve wracking that this just happened not long ago," said Wehr as she lined up next to the flashing police cars. "We're safe, right?"

The 26.2-mile (42.2-kilometer) marathon course weaves its way through the city and also includes a half-marathon and a 5K run.

___

Associated Press writers Elliot Spagat in San Diego and Christopher Weber in Los Angeles contributed to this report.