The last NYPD cops assigned full-time to New York City public schools are being moved out — despite nationwide calls for heightened security in the wake of last month’s Florida shootings.

As the nation mourned the 17 victims of the school massacre at Parkland, Fla., the NYPD was removing Sgt. Raul Espinet from his post at Francis Lewis HS in Fresh Meadows, Queens — where he had worked for more than a dozen years. Parents, teachers and students are livid over the beloved cop’s departure.

“My colleagues think it’s outrageous — and really stupid,” teacher Arthur Goldstein said. “We’re not enthusiastic about arming teachers, but we liked having a cop around.”

Espinet’s position was eliminated because cops in Mayor de Blasio’s new community policing units will visit schools while patrolling the neighborhood, according to the NYPD. School safety agents are stationed at all schools, but are not armed.

The once-common practice of putting an armed cop in schools waned in the 1990s. All were gradually eliminated, but Francis Lewis, one of the biggest high schools, slipped by. Bayside and Benjamin Cardozo high schools also recently lost their full-time NYPD officers, according to parents.

Espinet is one of the last — if not the last — school cop to go.

“I’m not aware of any other school with a full-time police officer assigned to it,” said Lt. John Grimpel, an NYPD spokesman.

Parents at the overcrowded Queens school, crammed with more than 4,400 students, are protesting the change.

“The community officer is in no way an acceptable replacement,” says a PTA petition launched last week.

The PTA is demanding that the NYPD and city Department of Education bring back an armed cop to Francis Lewis. It has collected more than 1,000 signatures in just two days, according to co-president Linda Lovett.

“It’s ridiculous,” Lovett said. “All over the country they are telling you ‘arm the teachers, get an officer in your school.’ New York City had a designated officer and they are actually cutting the program . . . they are making us less secure.

“You are talking about 5,000 people in a one-block radius, and you’re telling me you can’t designate one officer?”

Students, parents and teachers say the school is generally safe and that fights are rare, but the Parkland shooting and one teenager’s recent online threat against Francis Lewis HS have put them on high alert.

“There are school shootings everywhere, and they took the one armed officer away from a school with 4,000 kids in it,” said sophomore Josephine Li. “Who is there to protect [us]?”

Espinet was a constant presence, both in the hallways and outside the building, according to staffers and students. He made sure doors were locked and busted kids for smoking.

“He knew what was happening,” said Phyllis Leibowitz, an English teacher who served 16 years as a dean. “Kids told him things . . . They would give him a heads up, and he would handle it before it happened.”

Espinet regularly attended school meetings and made suggestions on how to make the school safer, staffers said. He also spoke to classes about careers in law enforcement and took troubled kids under his wing.

“He was as much of a social worker as a police officer,” said Al Lahood, a social studies teacher. “He was part of the school community. Without him . . . there’s a vacuum, a piece that’s missing.”

Others said Espinet’s presence was a “deterrent” for crime and they worry his absence invites bad behavior.

“It’s not like he was standing there with a gun out,” Lovett said. “He knew everybody. When you get to know everybody, crime goes down.”

Espinet, 50, was transferred to an NYPD unit that evaluates recruits.

The ill-timed move comes as towns across the country are putting armed cops in schools in the wake of the Valentine’s Day massacre at Marjory Stoneman Douglas HS.

In New York, Staten Island City Councilmen Steven Matteo and Joe Borelli, and Borough President James Oddo, have asked de Blasio for armed officers in all of the city’s 1,700 schools — something the mayor has long argued would cost too much.

Matteo reiterated his plea in light of Espinet’s reassignment.

“I hope the NYPD and the administration listens to parents and students in the Fresh Meadows community and allows this officer to stay where he has obviously had such a positive impact,” he said. “Sadly, we live in a world where horrific attacks on our children have become a regular occurrence, but fortunately we also have the greatest police department in the world to protect us.”