Mr. Klein began to use test scores to measure schools’ performance, and joined with the Rev. Al Sharpton in forming the Education Equality Project in 2008 to promote good instruction and education reform for minority and poor children. “It is certainly what makes Joel Klein tick,” said Kati Haycock, the president of the Education Trust, which advocates for progress on the issue. “And you can’t say that for everyone.”

The city has even tried to attack the deeper issue of how children are reared at home, by offering some families monetary incentives to go to the dentist for checkups, for example, or to maintain good school attendance. The three-year-old pilot project was ended in March after it showed only modest results.

For several years, data suggested that the city had seen improvements among all ethnic groups, including in graduation rates, which have risen about 14 percentage points for black and Hispanic students since 2005, and a national standardized test given every other year to a sampling of fourth and eighth graders.

Even so, the scores on the national test, considered tougher than the state tests, did not exactly show a mastery of material. Forty-nine percent of white students and 17 percent of black students showed proficiency on the fourth-grade English test in 2009, for example, up from 45 percent of white students and 13 percent of black students in 2003.

The city made no statistically significant progress in closing the racial achievement gap in that time, said Arnold Goldstein, a statistician at the National Center for Education Statistics, which administers the national test. With few exceptions, including Charlotte, N.C., and Washington, D.C., the achievement gap on the national tests has remained constant in all major cities.

But the test scores that the mayor and the chancellor chose to highlight were the state standardized tests, and they built their entire system around it, with schools’ A-through-F grades, teachers’ bonuses and now tenure decisions dependent on how well their students performed on the tests.

By 2009, the passing rates of black students on English exams had narrowed to within 22 percentage points of white students’, and within 17 points on the math exams. And charter schools, which predominantly serve black students, were doing so well that one Stanford University researcher proclaimed that they had practically eliminated the “Harlem-Scarsdale” gap in math.