NEW YORK CITY — Brooklyn’s Boerum Hill prison and a Rikers Island complex will close in 2020, eliminating roughly 2,100 beds from the city’s jail system as Mayor Bill de Blasio pursues his borough-based prison system.

The Brooklyn Detention Complex on Atlantic Avenue will close in January and the Eric M. Taylor Center on Rikers Island will close in March, de Blasio said.

“New York is again debunking the notion that you must arrest your way to safety,” de Blasio said. “These two closures show that we are making good on our promise to close Rikers Island and create a correctional system that is fundamentally smaller, safer and fairer.”

The announcement comes one month after City Council approved the $8.7 billion plan for a controversial borough-based jail system, which has drawn outrage from criminal justice advocates and future neighbors worried about the size of the new prisons.

The de Blasio administration plans to build new borough jails, ranging in height from 195 to 295 feet, in Lower Manhattan, Downtown Brooklyn, Kew Gardens and Mott Haven.

Facilities will have modern designs and give incarcerated people better access to their families, social services and the courts, from all of which they are isolated on Rikers, officials said.

The Brooklyn Detention Complex, a 759-bed jail that has stood at 275 Atlantic Ave. since 1957, it currently holds about 400 people.

The 1719-bed Taylor Center was built in 1964, expanded in 1973 and currently holds 850 serving city sentences of one year or less.

Prison staff will be reassigned, not laid off, and Brooklyn Detention Complex inmates will be moved to other borough jails, not Rikers Island, the mayor said.

The city projects no more than 3,300 New Yorkers will be jailed by 2026 when lawmakers say they will ultimately ban jails from operating on Rikers, the city’s target date for shuttering the island’s facilities.

“Today’s announcement is an important step forward in our efforts to bring about a new era of correctional practice in New York City,” said Department of Correction Commissioner Cynthia Brann.

“This is an exciting opportunity to make the best use of the space we have available today while continuing to work towards building our future.”