The NYPD has reversed its decision to remove armed officers from three Queens high schools.

The move comes a week after The Post’s report on the cops’ ouster — and parents’ fury over the decision — went viral.

An NYPD representative from the 111th Precinct announced at a School District 26 meeting Friday that cops would be reinstated at Francis Lewis, Bayside and Benjamin Cardozo high schools.

An NYPD spokesman, Lt. John Grimpel, told The Post the officers will return on Monday.

Francis Lewis HS PTA co-president Linda Lovett, who started a petition to restore a cop to her kids’ school, was elated.

“I think it’s amazing. I’m so happy. I can’t thank The Post enough,” she said. “This is the power of the press, I have to say.”

Lovett and other Francis Lewis parents were up in arms when they learned the NYPD would do away with armed officers in the schools by April 1. The ill-timed move came as the country was grieving the murders of 17 students and staffers gunned down in a Valentine’s Day massacre at a Parkland, Florida, high school.

Lovett gathered more than 1,000 signatures from parents, students and teachers who wanted their cop back.

“The federal government and local communities are suggesting that schools arm their teachers and hire private armed security to keep us safe, yet New York City is actually taking the security away from their largest school — Does that make sense?” the petition stated.

The officer assigned to patrol Francis Lewis, Raul Espinet, was beloved by parents and students after working at the school for some 13 years.

Espinet requested a transfer out of the 111th Precinct after his school position was eliminated as part of a city-wide shift to a community policing model in which officers patrol multiple schools in their assigned neighborhoods. School safety agents continue to guard schools, but are unarmed.

Espinet was one of the last — if not final — NYPD cop to work full-time in one school. Staten Island schools also lost cops.

Francis Lewis is one of the largest high schools in the city with more than 4,400 students. Staff and parents credited Espinet with helping keep it safe.

“Now we will stay, hopefully, one of the safest districts,” Lovett said.

Lovett said Principal David Marmor said Wednesday that the city Department of Education opposes guns in schools.

The 111th Precinct representative told Lovett: “If we don’t get our officers back, it will be because of the DOE,” she said.

“It’s an NYPD decision and we defer to them,” said DOE spokeswoman Miranda Barbot.