A sheriff’s deputy promised he would take the first bullet as he led frightened office workers to safety inside the Inland Regional Center.

“Try to relax, sir. Try to relax,” the unidentified San Bernardino cop can be heard saying in a cellphone video made in the aftermath of Wednesday’s massacre.

“I’ll take the bullet before you do, that’s for damn sure,” the deputy tells the group of almost 50 workers as he directs them through a hallway in the building where 14 people were slaughtered.

The three-minute clip, posted online by local radio station KPCC, was taken by Gabi Flores, one of the terrified employees at the center.

“Just be cool, OK?” the deputy, his voice firm and consoling, tells the workers, who are reeling with fear.

The clip begins with the deputy shouting around a corner.

“Are you ready? If you’re not cool, I’m not walkin’ ’em, dude,” he hollers to an unseen fellow deputy who apparently is checking to see if the coast is clear.

“F–k,” a woman with long black hair says under her breath, fear and impatience filling that single hissed syllable.

A brief glimpse of the brave deputy is visible between the shuffling shapes of the evacuees. He’s an ­ordinary-looking man, bald, in a dark uniform.

But his command of the situation is evident in his voice, and shows how ­extraordinary he is.

“Sir?” he asks someone at the head of the line. “Go. Go. Go to that other deputy. Keep your hands where I can see them,” he instructs. “Go all the way to that deputy.”

Some of the evacuees appear to be sniffling as they move forward, hands raised. A small boy walks between two women, each holding one of his hands.

“Thank you. Thank you. Try to relax,” the deputy encourages them, before promising to take a bullet on their behalf, should it come to that.

The hero deputy is well out of view by the time the group progresses to an ­elevator bank.

An elevator comes — three short “dings” ring out. “Go! Go! Go!” one woman urges fearfully.

With that, the video cuts out, and the group evidently rides down to safety.

“Oh, yes, we know all about the video,” a Sheriff’s Office spokeswoman said, pride in her voice, when The Post asked about the clip.

The deputy’s identity had not been released as of Thursday evening.