Sign up for our special edition newsletter to get a daily update on the coronavirus pandemic.

New York City schools will remain closed for the rest of the school year, Mayor Bill de Blasio said Saturday.

The mayor characterized the decision as “painful” but said keeping the schools closed is the way to keep the coronavirus from spreading.

“It will help us to save lives,” de Blasio said during a news briefing at City Hall. “It’s the right decision,” he said.

The mayor said the social distancing strategies in place are working to reduce the spread of the virus. Students have been learning remotely since school buildings were closed last month.

He said the decision was made in part after a conversation Friday night with Dr. Anthony Fauci, director of the National Institute of Allergy and Infectious Diseases and one of the leading federal officials on the pandemic. “He was so clear about how important keeping the schools closed would be in our overall strategy,” the mayor said.

The United Federation of Teachers is behind the shutdown. “Keeping school buildings closed is unquestionably the right decision,” the teacher’s union said in a tweet attributed to President Michael Mulgrew. “Learning continues. Thanks to the efforts of our educators, remote learning is working in New York City.”

The city is focusing on reopening in September. It will be “unlike any reopening we have ever seen,” de Blasio said.

However, Chancellor Richard Carranza said the path of the virus will be what determines when schools actually open.

“Everything is on the table, but nothing has been decided because circumstances in terms of public health will determine when we open again,” Carranza said.

In the meantime, the city is trying to get devices to students who still don’t have them by the end of the month. Roughly 175,000 devices that belonged to schools have been loaned out already, Carranza said, along with another 70,000 wifi-equipped iPads.

The city is asking parents to complete a survey if they don’t have the required tech for distance learning. “By the end of April, every student that’s identified themselves as needing a device based on the survey will have a device,” Carranza said.

Plans are also in place to reach out to families about how remote learning is going, and to provide additional materials to help parents coach their children. The Department of Education is mailing “learning packets” to students who are waiting for devices so they don’t lose instructional time, the chancellor said.

Teachers are being asked to be “flexible” when it comes to grading, Carranza said. “Work is being graded but we are emphasizing flexibility in this time period,” he said.

De Blasio said the Department of Education will be working closely with the 75,000 seniors who expect to graduate this year.

“We do not want to see these seniors robbed of their future,” the mayor said, acknowledging the chance of graduation ceremonies this year are slim. Nevertheless, helping those seniors graduate is going to be one of the primary objectives, he said.