Mayor Bill de Blasio is phasing out New York City’s Gifted and Talented program, he announced Friday — bowing to critics who complain that the coveted model is racist. Current students in the program will be able to stay in accelerated-learning classes to completion. But new cohorts they will be completely eliminated by fall 2022, ending the current testing for 4-year-old city kids. “The era of judging four-year-olds based on a single test is over,” de Blasio said Friday. It is being replaced by Brilliant NYC, a program offering students aged 8 and up chances for accelerated learning — while staying in their regular classrooms with other pupils. De Blasio announced the major overhaul despite being in the final months of his term in office. The candidates to replace him, Democrat Eric Adams and Republican Curtis Sliwa, have both made clear they did not want to completely eliminate the program, which critics have attacked in part because of the higher number of white and Asian students that pass the tests. “Brilliant NYC will deliver accelerated instruction for tens of thousands of children, as opposed to a select few,” de Blasio said. “Every New York City child deserves to reach their full potential, and this new, equitable model gives them that chance.” But critics quickly ripped Hizzoner for making the decision so late in his administration after earlier calls for him to leave it to his successor. “Gifted and talented programs have been an integral option for generations of schoolkids,” tweeted Sen. John Liu (D-Queens), who chairs a panel on New York City schools. “@BilldeBlasio promised intensive public engagement about it but now wants total elimination. “This won’t help his abysmal record. If anything, his legacy will be revocation of mayoral control,” said Liu. Supporters of G&T have long hailed it for giving academically advanced kids the opportunity to learn at an appropriate pace and serve as an educational springboard. However, detractors counter that the admissions model favors families of means who are better able to prepare for the test and that the exam serves as a poor marker of talent in young children. But the debate has also focused on claims that the racial makeup of the classes reflects an unfair bias. Asian students account for 43 percent of G&T students despite being just 16.2 percent in the school system.