(Associated Press) - A gunman burst into a Planned Parenthood clinic in Colorado Springs and opened fire, launching several gunbattles and an hourslong standoff with police as patients and staff took cover under furniture and inside locked rooms. By the time the shooter surrendered, three people were killed - including a police officer - and nine others were wounded, authorities said.

For hours, police had no communication with the shooter other than intermittent gunfire from inside the clinic. As the standoff progressed, officers inside the building herded people into one area and evacuated others.

Officers eventually moved in, shouted at the gunman and persuaded him to surrender, police said. About five hours after the attack started, authorities led away a man wearing a white T-shirt.

Police identified him as 57-year-old Robert Lewis Dear of North Carolina. Jail booking records indicate Dear is due in court on Monday.

Few other details about the suspect were immediately available, including whether he had any connection to Planned Parenthood.

"We don't have any information on this individual's mentality, or his ideas or ideology," Colorado Springs police Lt. Catherine Buckley told reporters on Friday. She said Saturday that investigators expect to study the crime scene for several days looking for clues.

Dear spent time at a small cabin in North Carolina with no electricity or running water about a half-mile up a twisty dirt road near Black Mountain, a neighbor said. On Saturday, there was a cross made of twigs on the door of the pale yellow shack.

"You can tell his personality is just off. The way he looked at you, the way he talked, he just seemed off," said James Russell, who lives a few hundred feet down the mountain. "If you talked to him, nothing with him was very cognitive - topics all over place."

Back in Colorado, Planned Parenthood said all of its staff at the clinic was safe. The organization said it did not know the circumstances or motives behind the attack or whether the organization was the target.

The University of Colorado in Colorado Springs police department identified the officer killed as 44-year-old Garrett Swasey, a six-year veteran of the force. He was married and had a son and daughter, according to the website of his church, Hope Chapel in Colorado Springs.

There were no immediate details about the two civilians killed in the attack. Five officers and four others were hospitalized in good condition, police said.

"Certainly it could have been much, much worse if it were not for the heroism of our police officers to corner the person in the building," Colorado Springs Fire Chief Chris Riley said.

More From WBSM-AM/AM 1420