Sanity — and Santa — have been restored at a Brooklyn public elementary school where St. Nick was banned, the Pledge of Allegiance was dropped and Thanksgiving was replaced with a “harvest festival.”

The good news arrived at PS 169 in Sunset Park on Monday morning, a day after The Post exposed the bizarre PC extremism of Principal Eujin Jaela Kim.

District 15 Superintendent Anita Skop stormed in the front door at 9:50 a.m., and minutes later, two fifth-grade boys were brought to the main office to lead a recital over the public address system of the Pledge of Allegiance, teachers told The Post.

As The Post reported on Sunday, the pledge hadn’t been said over the loudspeakers since the beginning of the school year. Kim, 33, became principal in May 2014.

Santa Claus is now reinstated at the school, and Department of Education officials said on Monday that the Pledge of Allegiance will be recited over the PA system every morning, in response to concerns from the community.

“It never would have happened if The Post didn’t do the story. That’s the only way we got our voices heard,” PTA president Mimi Ferrer said.

“I’m ecstatic that Santa can come back. Hopefully, he can make a visit to the kids in our school for our winter celebration on Thursday.”

At a school leadership team meeting last week, Kim told staffers, “Do not celebrate Christmas, do not celebrate gift-gifting, do not celebrate Santa. We need to be respectful,” according to a school source.

“Christmas is a Christian celebration and something that is tied to religion,” Kim told them, according to the source.

DOE officials said on Monday that PS 169 administrators were mistaken in believing that Santa could not be used as a holiday symbol.

Only depictions of religious figures or texts are banned.

“We work to foster inclusive communities in our schools that welcome students and families, and celebrate the diverse values and traditions of all New Yorkers,” DOE spokeswoman Devora Kaye said in a statement.

“This principal continues to work closely with her school community to ensure PS 169 is an inclusive school, meet students’ and families’ needs, and celebrate the values that make her community and New York City great,” Kaye said.

Officials said the school emailed staffers new guidelines on Monday allowing the use of Santa Claus “as a holiday symbol with secular dimensions.”

“I apologize for any confusion this may have caused,” Kim wrote in the email.

Here are some of the latest skirmishes in the War on Christmas: