Outside the social services center, police patrol cars and armored SWAT trucks sealed off streets as helicopters swarmed the sky.

Gunshots had been reported at the Inland Regional Center in San Bernardino late Wednesday morning, and emergency responders were scrambling to get survivors out of harm’s way and victims to nearby hospitals.

Fear gripped those barricaded inside the three-building complex, where the county health department was throwing a holiday party.

“People shot. In the office waiting for cops,” Terry Petit’s daughter texted, according to the Associated Press.

“Pray for us,” wrote the woman, who works at the center. “I am locked in an office.”

“There’s a shoot out at my work,” another woman texted her sister, according to CBS Los Angeles. “I’m scared.”

“Active shooter on site. We’re all locked in offices and on the floor,” one woman, Megan Murphy, wrote to her parents, according to CNN.

“Please pray for us,” she wrote.

Murphy survived.

After the mass shooting in San Bernardino, Calif., on Dec. 2, details are starting to emerge about who was involved in the attack. (The Washington Post)

Fourteen people were killed and 21 wounded in the deadliest mass shooting in the United States since 2012, when a lone gunman killed 20 children and six adults at Sandy Hook Elementary School in Newton, Conn., as well as his mother.

‘We thought it was a fire drill’

After the shooting began, around 11 a.m., an alarm rang out. When the people inside the complex began to evacuate, they were sent back inside.

“We thought it was a fire drill,” Lavinia Johnson, executive director of the Inland Regional Center, told CNN. “We started to exit. … We were told to go back into the building.”

Dorothy Vong, a nurse there, told the Los Angeles Times that she thought it was an active-shooter drill.

She ran to a window with her cellphone to film a video to send to her husband.

“They’re all geared up,” a woman said in the recording. “Rifles and everything.”

Soon after, Vong sent a message to her husband: “Well it’s real.”

Mark Vong told his wife not to panic.

“They train for this,” he told the Times. “They know it’s going to happen.”

Inside a bathroom at the complex, Chris Nwadike could hear the sounds of horror unfold.

“We heard something like explosives — big sounds first, then a few seconds, then we heard the gunshots,” Nwadike, an employee at the San Bernardino Department of Public Health, told The Post.

“Everybody lie down!” someone in the bathroom yelled.

“He was pointing at a bullet hole in the wall,” Nwadike told ABC News. “We got down until the police came.”

‘I just want to tell you that I love you’

When Denise Peraza called her sister, she was in tears.

“She said ‘I just want to tell you that I love you’ and then she said she had to go and she hung up,” Stephanie Baldwin told KABC.

The attackers, Peraza said later, were clad in black and remained quiet as they sprayed a conference room with bullets.

Peraza was shot in the back but is expected to recover, KABC reported.

“As soon as the gunfire started, everyone dropped to the floor and they were underneath desks, and she was trying to shield herself with a chair, along with a man next to her,” Baldwin said. “Then, all of a sudden, she said she just felt it going through her back.”

Melinda Rivas, a social worker who was on the third floor at the center, said a colleague came barreling down the hall, yelling warnings about the shooters.

“We all started running and screaming,” she told CNN.

Some people locked themselves in offices on the site, which houses a conference center and serves thousands of developmentally disabled people. Rivas and dozens of her co-workers holed up in a conference room, where they piled furniture against the door, according to the San Bernardino Sun.

“I had no idea if I was going to get out alive,” she said.

Rivas called her children — 21-year-old twins — and told them to “be safe,” according to CNN.

Not long after, police evacuated Rivas and her colleagues from the complex.

“We were all just scared to leave with our hands up,” she told CNN.

‘I’ll take a bullet before you do’

In a shaky cellphone video filmed by Gabi Flores, a consumer services coordinator at the center, and posted by public radio station KPCC, an officer with a long gun is seen lining people up in a hallway and preparing to take them outside.

“Are you ready? If you’re not cool, I’m not walking out there,” he said to the bystanders, who had their arms raised. “Keep your hands where I can see them.”

At least one child was in the group, clutching an adult’s hand.

While walking to elevators, some started whispering about the shooters.

“Try to relax, everyone try to relax,” an officer told them. “I’ll take a bullet before you do — that’s for damn sure. Just be cool, okay?”