Nearly 30,000 eighth-graders will sit for the specialized high school admissions test this weekend, the sole criterion for entry into one of eight NYC schools ranked academically among the best in the nation.

Graduates of these schools -- including Bronx Science, Stuyvesant and my alma mater, Brooklyn Tech -- hold top posts nationally in science, technology, business and government, and are among Nobel Prize winners.

In a misguided effort to promote certain minority groups, civic activists and some elected officials want to replace the test as the sole admission criterion with measures used at 100 other city high schools.

Our unequal school system yields unacceptable achievement gaps: Only about 3% of African-American and Latino seventh-graders tested above grade level last year on standardized state math tests compared with 31% of Asian-Americans and 22% of white students. The majority of students at specialized high schools are Asian-American.

While often described as elite, these specialized schools are in fact havens for working-class children from poor immigrant households who qualify under federal anti-poverty guidelines for free and subsidized lunch. Two-thirds of Brooklyn Tech's students qualify.

Also, the city's economy is at stake as it strives to become the East Coast center for the next big wave of enterprise based on advanced science, technology, engineering and math.

Instead of throwing out a merit-based test, the city must aggressively reach into middle schools earlier to identify and nurture African-American and Latino children with the capacity to succeed both on the test and in the schools.

Mayor Bill de Blasio's creation of universal pre-K is an important step. So is the city's recent effort to revamp the test to eliminate any inherent bias. Programs for gifted and talented students must be created in elementary schools in African-American and Latino communities, and middle schools in those areas must offer enriched math classes and better test prep.

Our public school system shouldn't lower the bar for admission to its best high schools. It should move to close the achievement gap by improving the quality of the education in schools serving African-American and Latino children.

Larry Cary is president of the Brooklyn Tech Alumni Foundation and a leader of the Coalition of Specialized High Schools Alumni Organizations.