A Queens public high school principal excluded 500 Catholic school kids from a list of 4,000 students applying to get into his school, raising cries from furious parents of foul play.

“It was almost like they knew who would be accepted,” Middle Village resident Jimmy Guarneri, 47, said of the lottery system that was supposed to fairly choose students to get into popular Maspeth High School. “We’re very angry.”

After being rejected by Maspeth, Guarneri’s son was accepted at a Catholic high school, but got only a partial scholarship.

“I’m working two jobs as it is,” Guarneri said. “His first choice was to go to Maspeth.”

More than 4,000 eighth-graders applied ​to the school, ​including 500​ Catholic school kids,​ the city Department of Education said. But the principal failed to “mark for priority” 207 Catholic school ​​students who had attended a Maspeth information session. None got offered seats.

The school sent acceptance letters to 370 students — all from public schools.

Maspeth High School is a “limited unscreened” school — one of 225 in the city — which gives admission priority to students who live nearby and attend its information sessions or open houses.

These schools send a list of those applicants to the DOE, which gives them priority in a “random” lottery.

The system is ripe for abuse by principals who want to exclude certain students or favor others, critics say.

Principal Khurshid Abdul-Mutakabbir told parents at a Juniper Park Civic Association meeting on March 16 he made a “clerical error” in omitting all Catholic school kids from the list.

But Abdul-Mutakabbir told civic leaders in a prior phone call that parochial applicants pose a “problem,” Juniper Hill president Bob Holden told The Post.

“He said, ‘In all honesty parochial schools are a problem because many of the students opt out and don’t go to my school. That leaves a seat [empty] and it costs the school funding,’” said Holden, who called for an investigation.

After parents got wind of the omissions and complained, DOE officials entered 207 parochial school applicants who had attended an open house or information session into a second lottery. On Tuesday, it offered seats to 66 of them — 15 percent of the accepted freshmen.

“All students who should have received an offer have received one,” said DOE spokesman Michael Aciman.

But double rejections left some Queens families distraught.

“I haven’t seen my son cry before and he’s cried twice this past week,” said Maspeth resident Santo Vicino, whose son was not given a slot. “I’m livid. Like any parent, I would cut my veins for my kid.”

The scandal exposes flaws in the city’s complex school choice system “and the way that schools can game it for their own purposes,” said Brooklyn College education professor David Bloomfield.

“These schools give preferential treatment to children whose parents have the time and resources to take them to open houses,” Bloomfield said. “It’s doubly unfair if principals don’t play by the rules.”

New York University education professor Sean Corcoran agreed that principals can cheat.

“They can tinker with the lists for any number of reasons — like weeding out kids who are lower-achieving, come from poor neighborhoods, or just don’t seem motivated enough to go to that school,” he said.

Queens City Councilwoman Elizabeth Crowley is drafting legislation to compel the DOE to report application and admission numbers for all “limited unscreened” high schools.

“I’m outraged and this is incredibly frustrating,” she said. “The principal’s explanation is not good enough. We need much greater transparency so parents can rest assured that they’re not being discriminated against.”

Parents may ask the city to redo the entire Maspeth lottery.

“I need this school for my son’s health, safety and well-being,” Vicino said. “I’m demanding a seat. I want what’s right.”