Under Friday’s settlement, the city has promised not to send inmates to the Albany County jail, but it will continue to transfer inmates to other counties if they are vulnerable to attack or present a high risk to other inmates or to guards .

“We believe there are a small number of cases where a transfer makes sense to protect the safety and security of individuals in our facilities,” a spokeswoman for the mayor, Avery Cohen, said in a statement. “The settlement will result in a more transparent process, which we believe is in the best interest of all parties.”

Mr. Washington, who had been convicted of attempted robbery, was 21 when he was transferred from Rikers Island to the Albany facility in March 2018, two weeks after he said he had gotten into an altercation with a deputy warden.

Currently, 10 detainees are being housed in jails outside of the city, including one person who is under 22. The city has not sent inmates to the Albany jail since November 2018, officials said.

The settlement came as Mr. de Blasio celebrated the City Council’s decision to close Rikers Island and to build new jails in four boroughs — his main criminal justice initiative since becoming mayor. That decision marked a milestone in the effort to reduce the jail population in New York City.

While Mr. de Blasio had been a leader in that effort, some advocates for inmates and elected officials criticized the administration’s practice of transferring young inmates to county jails.

Not only did the practice seem to be an end-run around the city’s own rule on solitary confinement, these critics said, it seemed to fly in the face of the plan to close Rikers Island and move inmates closer to their families and to legal services.