COLORADO SPRINGS — A gunman killed three people, including a veteran police officer, at a Planned Parenthood clinic here Friday, the latest act of bullet-riddled mass terror to strike a state achingly familiar with it.

The shooting and subsequent standoff spanned five hours, and, by the end, nine other people had been transported to the hospital with gunshot wounds. All of the injured were reported in good physical condition Friday night. The emotional injuries struck the community deeply.

Colorado Springs Police Chief Peter Carey said it was a “very, very difficult afternoon in Colorado Springs.”

“All that I can say,” Carey said Friday evening, “is my heart is broken.”

The city’s mayor, John Suthers, said: “This is a terrible, terrible tragedy that occurred here in Colorado Springs today.”

RELATED: Live blog of Colorado Springs Planned Parenthood shooting

The shooting killed Garrett Swasey, 44, a police officer at the University of Colorado at Colorado Springs. Swasey, a championship ice dancer turned six-year-veteran officer, was one of the first officers to respond to the clinic, which is about 10 minutes from the university campus.

The shooting began at 11:38 a.m., and the entire incident took place at the Planned Parenthood clinic, according to police. Officers exchanged gunfire with the suspect, identified by a federal law enforcement source as Robert Lewis Dear, 57, throughout the afternoon, even as they also used an armored vehicle to rescue people trapped inside the clinic. After preparing over the police radio for a final gunbattle, officers took the suspected shooter into custody without incident at 4:52 p.m. Colorado Springs police Lt. Catherine Buckley said officers at the scene were able to shout to the man and convince him to give himself up.

He was led out of the clinic in handcuffs, wearing a white T-shirt and a white beard. Police did not release his name and said Friday night they would not confirm it. He told officers at the scene that he acted alone, according to police radio transmissions. But Buckley said investigators can’t yet say why he acted at all. “To even speculate on a motive would not be reasonable” at this point, Buckley said.

WATCH: Lt. Catherine Buckley updates media at 4 p.m.

She said initial reports described the shooter’s weapon as “a long gun,” such as a rifle. Buckley said the suspect also carried “items” into the clinic, although authorities didn’t know whether they were explosive devices. Police saw a propane tank at the clinic, but officers do not know whether the suspect brought that to the clinic.

The clinic is at 3480 Centennial Blvd., just north of West Fillmore Street, on the city’s west side. During the standoff, police shut down Centennial Boulevard and told people at nearby businesses to shelter in place as officers tried to capture the shooter. More than 100 people waited out the chaos inside a King Soopers.

Shortly after noon, Colorado Springs police Cmdr. Kirk Wilson told journalists at the scene that police were having trouble getting officers to the shooting area.

At a news conference at about 1:30 p.m., Buckley said police could not confirm where the shooter was or whether he was alone. At 2:15 p.m., the police department reported that officers were “encountering gunfire” from the suspect inside the Planned Parenthood building.

And still they pushed further into the building.

“Our officers acted with untold valor,” Buckley said.

Outside the police roadblock stood a man named Joan Motolinia, who said his sister was in the clinic. He said he talked to her by phone at about 1:30 p.m., but she could talk for only a short time. She had gone to the clinic for an appointment, and now she was hiding under a table. “She was very afraid,” he said.

While she was talking, he could hear gunfire in the background. And after about two minutes, his sister hung up on him. “She was telling me to take care of her babies,” he said.

PHOTOS: Scene at the Colorado Springs Planned Parenthood

Back at the clinic, a SWAT team made plans over the police radio to end the standoff. It called for tear gas and gas masks. Outside the clinic, one officer shouted for a sniper.

“We’ve got to stop this guy,” an officer said into his police radio.

Afternoon drifted toward nightfall, and the tension persisted. Police maneuvered through the clinic, apparently watching the suspect’s movements on surveillance cameras. At one point, he sat down in a chair and looked around.

“It looks like he’s almost waiting,” one officer said over the air.

All the while, police raced to evacuate those inside.

Police dispatchers relayed to officers at the scene information from victims who called 911 while huddled behind locked doors in the clinic, according to radio traffic. One person was in a bathroom. Another was in a file room. There was chatter about the clinic’s “safe room.” There was a special passcode of rhythmic knocks that would convince the evacuees to open the door.

Multiple times, the SWAT team’s armored truck, called a BearCat, sped away from the clinic and toward a line of more than a dozen waiting ambulances.

In one of the vehicle’s runs, first responders unloaded an injured person onto a gurney.

In three more runs, people wrapped in blankets and others wearing hospital scrubs walked out of the truck.

Several of the rescued exited the BearCat wearing T-shirts in weather that had dipped into the low 20s with thickly falling snow. Police called out instructions to them, some going into ambulances and others into police cars.

Two hours passed, then three, and the number of people trapped inside the clinic dwindled.

WATCH: Man says sister was inside Planned Parenthood clinic

Meanwhile, the suspect had moved into a room, and officers had closed in. On the radio, they discussed a tentative plan: Shoot through the wall.

“Shoot head-high to start with,” one officer said on the air.

And, then, suddenly, the standoff was over.

An officer said calmly into his radio that the suspect was detained.

“OK,” another officer responded. “Good job.”

When it was over, police said there was still more work to do.

It could take days to process the crime scene and gather evidence. There will have to be a separate investigation about the police officers’ use of force.

“At this point I have as many questions as you do,” Carey said at a news conference immediately after the shooter was apprehended. “I have some police officers at the hospital. That’s where I’m going next.”

And so he and Suthers and other officials did, meeting with four of the wounded Colorado Springs police officers at Penrose Hospital on Friday evening. It was unclear where the fifth wounded officer was taken for treatment.

The officers were conscious and grateful for rescue personnel who rendered aid under fire, Colorado Springs Fire Chief Christopher Riley said.

The law-enforcement victims — three police officers and a sheriff’s deputy, all men — were surrounded by their families at the hospital, he said.

“There’s one word: heroes,” Riley said. “They laid their lives on the line today.”

“The officers are obviously in some pain, but thankfully they’re alive and talking to us,” Riley said. “They’re heroes. They’re absolutely heroes.”

And back at the scene, officers began trying to piece everything together.

Over the radio, one officer asked what should be done with the BearCat. There was blood inside, bullet marks on its body.

“I don’t think,” another officer replied, “we’ll have time to do anything with that tonight.”

Staff writers Elizabeth Hernandez. Kirk Mitchell and Joey Bunch contributed to this report.