St. Ann’s has “small classrooms, they were cluttered . . . the atmosphere was depressing . . . the kids looked dirty and disheveled.” That was Uma Thurman’s ex-boyfriend complaining in court last week that he didn’t want his 4-year-old daughter attending the elite Brooklyn prep school, whose tuition starts at $39,000 for kindergarten and goes up to $43,000 — not including all of the fees, donations and other expenses of private school.

Well, as they say, have I got a deal for him. The BASIS Independent Brooklyn School in Red Hook is not only large and airy with modern classrooms, a full-size basketball court, a state-of-the art auditorium and well-kept students. It’s only $26,000 for each grade from K-12. Best of all, your child will probably learn more than at just about any school in the country. BASIS, a network of two dozen private and charter schools, was started in 1998 and will be opening a new campus in Manhattan in the fall.

While America is falling behind globally — we were ranked 24th in the world on the most recent Program for International Student Assessment scores — BASIS is soaring. In math, reading and science three BASIS schools ranked above Shanghai, Korea, Finland and Singapore. If BASIS schools formed a country it would be ranked top in the world. Even compared to students whose families are in the same income brackets, BASIS is still performing 18 percent better on average.

But there’s a catch. If you’re looking for a place that will coddle your kids, you’ve come to the wrong school. As headmaster Hadley Ruggles tells me, “Brooklyn is a progressive place, and it looks like we have rolled back the clock.”

The students are taught grammar. Math in the early grades involves drilling. Students are required to take three years of Latin. Writing is focused on analytical work, not “journaling.”

The school does offer some trendy classes: Elementary school requires several years of engineering and Mandarin. But they’ve also stuck with Advanced Placement classes, even as many schools have dropped them out of fear that kids will burn out from all the tests. Students as young as eighth grade are taking APs and scoring well. Plus, middle-schoolers take biology, chemistry and physics classes three days a week each.

The teachers have come from top college and graduate programs, and many have left their own fields to teach.

When Mrunali Das, who teaches calculus, applied for a job with BASIS, she taught a class at a BASIS school in Washington, DC. Because she wasn’t going to be able to learn the students’ names during one class period, she assigned them each the name of a famous mathematician. “One student really wanted to be Euclid,” she recalls, laughing.

Every grade has homework — even kindergartners get 15 minutes per day. Middle-schoolers can have up to two hours per night with 30 math questions four nights per week. And students are expected to do this themselves. “We don’t want too much parental intervention,” says Ruggles, who taught at the BASIS school in Scottsdale, Ariz., before coming here. “I like a self-regulated human being.”

Who doesn’t? It helps that the school doesn’t do much to emphasize extracurricular activities. Sports teams don’t practice every day and, compared to most of the expensive private schools in New York, the offerings will look paltry. There’s LEGO Robotics, but no football; drama club, but no swimming.

But there’s a market for this emphasis on academics. The school already has more applications than it knows what to do with for next fall. It can only accept 100 kids per grade.

And even in Brooklyn, it turns out there are families that value this kind of education. Many of them are immigrants. I met a young South Asian fifth-grader who transferred in January from his public elementary school and an Eastern European 10th-grade girl who left SAR Academy, an Orthodox Jewish private school in Riverdale, because she and her parents found the curriculum at BASIS to be more rigorous.

Ruggles says many immigrant parents recognize that BASIS schools take the best of the pedagogy that other countries use and meld it together. It’s a school for strivers. BASIS offers a couple of scholarships to kids in Red Hook’s public housing as well as a few merit scholarships.

But everyone else pays the sticker price. There’s no need-based financial aid. As Ruggles notes, there are families that struggle mightily to pay that tuition, but they really want their kids at BASIS. And it’s easy to see why.

Naomi Schaefer Riley is a senior fellow at the Independent Women’s Forum.