There is rare consensus among inmate advocates and correction officials that the surest way to fix the Rikers Island jail complex is to empty it.

While Mayor Bill de Blasio of New York is not prepared to go that far, he and the state’s chief judge will introduce a plan on Tuesday to gradually reduce the inmate population at Rikers by clearing the backlogs at state courts, a pocket of persistent government dysfunction that has long frustrated improvement efforts. Such backlogs can keep people locked away for hundreds of days while they await trial.

As of late March, over 400 people had been locked up for more than two years without being convicted of a crime, according to city data that is to be released publicly for the first time. And there are currently a half-dozen people at Rikers who have been waiting on pending cases for more than six years.

“Too many people have been detained at Rikers, sometimes for years, while they wait for trial,” Mr. de Blasio, a Democrat, said in a statement. “For the first time, our city will work with the courts, law enforcement, district attorneys and the defense bar to immediately tackle case delays head-on and significantly reduce the average daily population on Rikers Island.”