I visit schools across this city and it never fails to energize me. The talent out there is outstanding. The students overflow with promise. But many of the smart kids I meet aren’t getting in to our city’s most prestigious high schools. In fact, they’re being locked out.

The problem is clear. Eight of our most renowned high schools – including Stuyvesant High School, Bronx High School of Science and Brooklyn Technical High School – rely on a single, high-stakes exam. The Specialized High School Admissions Test isn’t just flawed – it’s a roadblock to justice, progress and academic excellence.

If we want this to be the fairest big city in America, we need to scrap the SHSAT and start over.

Let’s select students for our top public high schools in a manner that best reflects the talent these students have, and the reality of who lives in New York City. Let’s have top-flight public high schools that are fair and represent the highest academic standards.

Right now, we are living with monumental injustice. The prestigious high schools make 5,000 admissions offers to incoming ninth-graders. Yet, this year just 172 black students and 298 Latino students received offers. This happened in a city where two out of every three eighth-graders in our public schools are Latino or black.

There’s also a geographic problem. There are almost 600 middle schools citywide. Yet, half the students admitted to the specialized high schools last year came from just 21 of those schools. For a perfect illustration of disparity: Just 14 percent of students at Bronx Science come from the Bronx.

Can anyone defend this? Can anyone look the parent of a Latino or black child in the eye and tell them their precious daughter or son has an equal chance to get into one of their city’s best high schools? Can anyone say this is the America we signed up for?

Our best colleges don’t select students this way. Our top-level graduate schools don’t. There are important reasons why. Some people are good at taking tests, but earn poor grades. Other people struggle with testing, but achieve top grades. The best educational minds get it. You can’t write a single test that captures the full reality of a person.

A single, high-stakes exam is also unfair to students whose families cannot afford, or may not even know about, the availability of test preparation tutors and courses. Now, I’d like to stop and say, I admire the many families who scrape and save to pay for test prep. They are trying in every way to support their children.

But let’s ask ourselves: Why should families who can ill afford test prep have to spend their money on it? Why should families who can easily afford test prep have an advantage over those that cannot?

My administration has been working to give a wider range of excellent students a fair shot at the specialized high schools. Now we are going to go further. Starting in September 2019, we’ll expand the Discovery Program to offer 20 percent of specialized high school seats to economically disadvantaged students who just missed the test cut-off.

This will immediately bring a wider variety of high-performing students, from a wider number of middle schools, to the specialized high schools. For example, the percentage of black and Latino students receiving offers will almost double, to around 16 percent from around 9 percent. The number of middle schools represented will go from around 310 to around 400.

This will also address a fundamental illogic baked into the high-stakes test. A great score and you might be in, but beware a point too low and you might be out. Now, a disadvantaged student who is just a point or two shy of the cut-off won’t be blocked from a great educational opportunity.

For a deeper solution, we will fight alongside our partners in the Assembly and Senate to replace the SHSAT with a new admissions process, selecting students based on a combination of the student’s rank in their middle school and their results in the statewide tests that all middle school children take.

With these reforms, we expect our premier public high schools to start looking like New York City. Approximately 45 percent of students would be Latino or black. As an example of growing geographical fairness, we will quadruple the number of Bronx students admitted.

I’ve talked a lot about bringing equity and excellence to our schools. This new admissions process will give every student in every middle school a fair shot. That’s equity. The new process will ask students to demonstrate hard work over time, and show brilliance in a variety of subjects. That’s excellence.

Anyone who tells you this is somehow going to lower the standard at these schools is buying into a false and damaging narrative. It’s a narrative that traps students in a grossly unfair environment, asks them to live with the consequences, and actually blames them for it. This perpetuates a dangerous and disgusting myth.

So let me be clear. The new system we’re fighting for will raise the bar at the specialized high schools in every way. The pool of talent is going to expand widely and rapidly. That’s going to up the level of competition. The students who emerge from the new process will make these schools even stronger.

They will also make our society stronger. Our most prestigious public high schools aren’t just routes to opportunity for deserving students and their families. They are incubators for the leaders and innovators of tomorrow. The kind of high schools we have today, will determine the kind of New York City we will have tomorrow.

Bill de Blasio is the mayor of New York City.