Mayor Bill de Blasio committed on Friday to closing New York City’s violence-plagued Rikers Island jails by 2027 at the earliest, but left to a future mayor the politically fraught decisions of where to open replacement lockups and whether to actually shutter the complex.

Under the plan, picking jail locations would not begin unless the city’s inmate population fell to 7,000 — expected in five years — and the jail island wouldn’t close unless the population is 5,000 or fewer, expected in a decade. The population is currently about 9,500, all but 2,400 of whom are housed on Rikers.

“When it’s gone, shut it down, throw away the key,” de Blasio said at a news conference, held Friday afternoon under the City Hall rotunda.

Pressure to close Rikers began mounting months after de Blasio, a Democrat, took office, when the U.S. Justice Department issued a scathing report depicting the island as long beset by a “deep-seated culture of violence” where “brute force is the first impulse rather than the last.” The brutality predated de Blasio’s tenure.

Closure advocates say Rikers and its antiquated jails, located in the East River between the Bronx and Queens, are accessible only by a small bridge and are far from most mass transit, stymying visitation by family and friends that has been proved to reduce recidivism.

But until Friday, de Blasio had dismissed the calls for closure by some advocates and political allies alike as unrealistic and cost-prohibitive. De Blasio attributed his change of heart to persuasion by advocates.

advertisement | advertise on newsday

His announcement overshadowed the release of a 146-page report, planned for an event Sunday, called “A More Just New York City: Independent Commission of New York City Criminal Justice and Incarceration Reform,” which recommends closing Rikers. The commission, empaneled at the request of City Council Speaker Melissa Mark-Viverito, was chaired by Jonathan Lippman, former chief judge of the New York Court of Appeals, the state’s top court.

De Blasio said he had not read the report, which recommends a range of changes to the system, including simplifying bail — it’s long relied on the fax machine — shortening pretrial bureaucracy and eliminating jail stays shorter than 30 days in favor of “community-based alternatives.” Such stays are about 69 percent of people serving jail sentences.

Under de Blasio’s plan, in addition to requiring the inmate population to fall — the trend for nearly a decade: it was 17,000 at the beginning of 2007 — crime would need to keep going down too, as it has for years, and the state court system would need to speed up how fast pretrial detainees, who make up 4 out of 5 detainees, face justice.

If crime rises and the city’s inmate population doesn’t fall “it could take longer” than 10 years to close Rikers, de Blasio said.

De Blasio said there had been no discussions of where to place new jails — or whether they would be in the boroughs or elsewhere. If history is any guide, siting jails in a neighborhood is certain to face ferocious opposition.

De Blasio is up for re-election in the fall, but even if he wins he’ll be term-limited, and his mayoralty will be ending near the earliest benchmark when the city would begin deciding whether to close Rikers and picking replacement jail locations.

He acknowledged that a future mayor could shelve the plan, but added: “I’m going to own this plan.

“It’s not kicking the can down the road.”