By Pete Williams, Jillian Sederholm, Andrew Blankstein, Miguel Almaguer and Phil Helsel
A gunman armed with an AK-47-style weapon burst into a Planned Parenthood clinic in Colorado Springs Friday, shooting at police from inside the building during the ensuing five-hour standoff.
Three people, including a police officer, died during the incident, Colorado Springs Police Department Lt. Catherine Buckley said. Nine others, including five officers, were wounded. All nine were in good condition, Buckley said.
Memorial Hospital in Colorado Springs said Saturday of the four patients it had received, two were discharged. There was no immediate word on the patients at other hospitals.
The slain officer was identified as Garrett Swasey, 44, of the University of Colorado-Colorado Springs police department. He was married and had a son and daughter, according to the website of his church, Hope Chapel in Colorado Springs.
The gunman, who police named as 57-year-old Robert Dear, walked out of the facility just before 5 p.m. local time and surrendered.
Gunshots were first reported near the facility on Centennial Boulevard in Colorado Springs at around 11:38 a.m. The shooter began firing in the parking lot and then entered the building, a law enforcement official told NBC News. The shooting unfolded during a regular working day, as patients waited for appointments and staff members attended to them.
"I heard everyone in the lobby screaming ‘Get down! Get down!’ and then I saw a gunman walking with a shotgun just shooting randomly outside of Planned Parenthood," Kentanya Craion said after getting out of the building.
The gunman "seemed calm, but crazy," she added, describing the man in a hunter's jacket and hat as "mumbling and ranting while he was shooting."
She said she ran into an open room with two others where they barricaded themselves inside for about five hours as they heard shots ring out.
Let our news meet your inbox. The news and stories that matters, delivered weekday mornings.
Authorities soon tapped into the building's video surveillance system, and were able to monitor the gunman's movements, officials said.
Colorado Springs Mayor John Suthers told NBC News that police watched for several hours on live video as the suspect hunkered down inside.
The officers watching passed along sketches of the building layout to teams inside, Suthers said. And as the gunman moved about the building, police rescued some of those trapped inside the other areas.
Other officials told NBC News that several people escaped during the ordeal thanks in part to police personnel who rammed the side of the building with a truck.
Police officers who responded were shot at with officers describing how they were "pinned down" by gunfire.
Police announced Saturday that they had cleared the building, which they had continued to inspect overnight to make sure several unidentified items the gunman brought with him were not dangerous.
Investigators were also trying to identify an item left in what is believed to be the suspect's car, a law enforcement source said. The device appeared to be a propane tank with wires sticking out, the source said.
University Chancellor Pam Shockley Zalabak said Swasey, the slain officer, was responding in support of city police to the active shooter situation when he was killed.
"We mourn the loss of a very brave police officer," Mayor Suthers said.
"While this was a terrible, terrible tragedy, it could have been much worse but for the actions of the first responders, particularly the police officers involved," Suthers told reporters.
"They were able to get people out of the building safely, and they were able to make sure that the perpetrator was isolated in a place where there could be communication back and forth about where he was," Suthers said.
Joan Motolinia said his sister was in the clinic when gunshots were heard. "She called me and she was telling me that there was a shooting — I heard the shooting," he said. "She couldn’t say too much because she was afraid."
"She was telling me she was hiding under a table," Motolinia said. He said he heard more shots over the phone, and his sister hung up.
Caren Kesterson was working at a nearby Supercuts hair salon when two police cars sped past.
"We got up and we looked outside, and it was like almost immediately we heard gunshots — easily over 20,” Kesterson told MSNBC by telephone.
Colorado Gov. John Hickenlooper issued a statement to victims families shortly after the fatalities were announced: “Our deepest condolences go out to the families and loved ones of those who were killed, including UCCS Officer Garrett Swasey, and those who were injured," he said.
CSP will be doing a procession escorting fallen UCCS Officer Swasey 30-45 min. I-25 toCircle to Janitell to Las Vegas.@CSPDPIO
Cecile Richards, president and CEO of Planned Parenthood Federation of America, thanked law enforcement in a statement released Friday.
"Our hearts go out to the families and loved ones of the brave law enforcement officers who put themselves in harm's way in Colorado Springs," she said. "We are profoundly grateful for their heroism in helping to protect all women, men and young people as they access basic health care in this country.”
Pete Williams is an NBC News correspondent who covers the Justice Department and the Supreme Court, based in Washington.
Jillian Sederholm is social media lead for NBC News, where she oversees daily operations and special projects on social platforms for NBC News, NBC World and NBC Poliics. She also writes about "Saturday Night Live" and other pop culture news. Jillian has worked at NBC since May 2014.
Andrew Blankstein is an investigative reporter for NBC News. He covers the Western United States, specializing in crime, courts and homeland security.
Miguel Almaguer is an NBC News correspondent is based in Burbank, California.