The school resource officer who was on the campus of Marjory Stoneman Douglas High School last week during a fatal school shooting has resigned.

Broward County Sheriff Scott Israel announced Thursday that Scot Peterson turned in his resignation after being told he would be placed on leave without pay.

Israel said Peterson was on campus during the shooting and took up a position, but he did not enter the freshman building when the shooting was taking place.

RELATED: How do you cope with a tragedy like Fla. school shooting?

RELATED: Broward deputies will carry rifles on campus

RELATED: Students: "We are going to change the law"

Peterson was on campus, armed and in uniform during the shooting, the sheriff said.

Two other deputies are also under investigation after a review of prior law enforcement calls involving accused gunman Nikolas Cruz spurred questions on whether the deputies followed the department's policies.

VIDEO: Sheriff Israel's press conference Thursday

Israel said he had decided to suspend Peterson, but, "As is his right, Scot Peterson chose to resign." Peterson had met the requirements to retire, the sheriff said.

Israel said there was video showing Peterson's actions, but the video would not be released because the investigation is continuing.

Peterson, 54, started working for the Broward County Sheriff's Office in 1985 and since 2009 has been a school resource officer at the high school, working to keep the school and its students safe, according to the Sun Sentinel. In 2016, his annual salary was more than $75,600, though that could have changed in the years since.

Israel said surveillance footage captured Peterson responding to the building where the shooting was unfolding. He said the deputy got there within a minute and a half of when the gunfire started. He positioned himself outside the building but never went in, Israel said.

The shooting lasted a total of six minutes. Peterson sat outside the building for four of those minutes, Israel said. In the end, 17 people were killed.

Israel said he was "devastated, sick to his stomach" when he found out about Peterson's actions. "There are no words."

"He should have went in," the sheriff' said. "Addressed the killer. Killed the killer."

At least one lawmaker is calling for Peterson to be denied his pension and benefits.

State Rep. Jared Moskowitz, a Coral Springs Democrat, issued a strong statement Thursday, calling Peterson's actions "reprehensible and unforgivable."

"I’m calling on the Governor, the Senate President, and the Speaker of the House to work with me and ensure Deputy Scott Peterson is not rewarded for his negligent inaction and his failure to protect our children. His failure to act cost students their lives and for that, he should not be entitled to a pension or any benefits.”

Information from USA Today was used in this report.

Make it easy to keep up-to-date with more stories like this. Download the 10 News app now.

Have a news tip? Email tips@wtsp.com, visit our Facebook page or Twitter feed.