A man armed with two guns repeatedly opened fire near a high school where students were attending games Saturday, sending children and their parents running for cover under the bleachers before police arrived and killed him, authorities said.

Witnesses said the 51-year-old man stopped his car in the middle of a street shortly before midday and began shooting, then walked toward the nearby Clark Elementary School, occasionally stopping to fire some more.

Officers cornered him and had no choice but to shoot because he refused to drop his weapons, King County Sheriff's Office spokesman John Urquhart said. No one else was hurt.

"There were lots of people up there, lots of kids -- this could have been a lot worse," Urquhart told KOMO-TV. "We don't know where he was going or why he was going there. We never had a chance to negotiate with him, talk to him. He was shooting, and the officers shot back."

Police ran onto the football field at nearby Issaquah High School and hustled about 120 students and fans to a safer position beneath the bleachers, witnesses said.

"A SWAT team showed up on site, fully loaded, fully geared up, just racing onto the field," said John Rudolph, a coach at the junior varsity football game.

Witnesses said they heard about 20 shots fired, but police have not confirmed that number. A shooting range is located nearby, and witnesses may have heard gunfire from that direction.

Lindsay Schumacher was walking nearby with her baby and started running when she heard the shots. A woman in a sport-utility vehicle saw her and yelled, "Get in the car!" and took her away from the gunman, she said.

"It was so close," said Dawn Hill, who was also nearby. "It was like you didn't really think it could be gunfire right behind you."

Tonya Collins said she saw the man pointing his weapon at a woman and her son as she was sitting in her car in a parking lot near the high school.

"It was surreal," she said. "He had a very weird look, obviously. ... I had the sense he could shoot me."

Urquhart said the shooting will be investigated by the King County Sheriff's Office at the request of Issaquah police.