New York City’s process for admitting young children into its gifted and talented programs will change this year, because of disruptions caused by the pandemic and growing opposition to the high-stakes exam the city has used to evaluate 4-year-olds.

For this year only, the families of toddlers interested in gifted programs will be enrolled in a random lottery in May — but only after their children are recommended for the programs by their preschool teachers. Students who are not enrolled in prekindergarten can apply for a virtual interview with an education specialist to determine eligibility. Mayor Bill de Blasio has said this year’s admissions process is a stopgap solution, and has promised to come up with a long-term plan on gifted admissions before he leaves office in January 2022.

The announcement caps weeks of uncertainty about how New York City would admit toddlers into gifted programs amid the pandemic. Earlier this year, Mr. de Blasio said he would offer the gifted exam for just one more year to avoid disruption to parents. But an educational panel that typically acts as a rubber stamp for the mayor rejected his plan to renew the gifted testing contract for a final year. That left City Hall scrambling to find another temporary solution.

But it was all but inevitable that the city would eventually scrap the test, which has been given for the last 15 years. The test has been widely criticized by experts, including many proponents of gifted education, who have said a single exam given to young children is not an appropriate way to determine intellectual giftedness. The exam is typically given in January for classes that begin that fall.

The deeper issue of how or even whether the city’s gifted classes should continue is much more contentious and complex, and will present an enormous challenge for the next mayor. Gifted education is a third-rail political issue in New York City, because the programs are starkly unrepresentative of the overall system. Whereas Black and Latino students make up nearly 70 percent of the district, they represent only about a quarter of the children in gifted programs.