University of New Orleans police officer Joshua Rondeno fired his weapon four times Thursday night at a former university student who police say threatened him with a knife and tried to steal his gun.

The shots all missed, and no one was injured in the incident.

The former student, Jonathan Peterson, 18, was booked with attempted first-degree murder.

Rondeno, 35, was climbing the stairs to the campus police headquarters when he saw Peterson standing by the door, according to Gary Marchese, commander of the NOPD’s 3rd District.

Rondeno said he looked down for a moment. Before he could look back up, Peterson allegedly placed the knife to his neck and told him not to move.

The two had crossed paths three hours earlier, according to Marchese. Peterson had asked Rondeno about a parking pass in that first encounter. Marchese said that Peterson later told detectives he initially thought of attacking Rondeno then but thought better of it. Instead, he stalked the UNO officer and waited until about 7 p.m. to approach him again.

Although Peterson had the knife to his neck, Rondeno was able to push him away and told him not to move, police said. But Peterson charged with his knife, and Rondeno fired at him four times. Peterson fell back on the steps of the campus police station, dropping his knife.

Peterson, who is not currently a student but was enrolled at the university during the fall, allegedly also told detectives he wanted to take the officer’s weapon to commit other crimes.

It’s not clear why he targeted Rondeno in particular.

Marchese didn’t identify Rondeno, but police records and a UNO spokesman confirmed his identity.

In a written statement, University of New Orleans President Peter Fos said that campus safety is a top priority.

“We are proud of the work that the men and women of the UNO Police Department perform every day, and that’s especially true given the bravery demonstrated by one of our officers last night,” Fos said.

A UNO spokesman said Rondeno has been assigned to desk duty, which is standard protocol after such an incident.

“This is highly unusual,” UNO spokesman Adam Norris said. “We normally have a very safe campus.”

Peterson’s bail has been set at $75,000.

Follow Benjamin Oreskes on Twitter, @boreskes.