Updated at 3:43 p.m.

Boston Public Schools will return to an all-remote learning schedule Thursday as the city’s seven-day positive test rate for the coronavirus climbs to its highest point since last May.

The shift will immediately affect 2,600 high-needs students who are currently attending city schools in-person two days a week as well as students from kindergarten through third grade who were poised to return to city classrooms later this week.

Mayor Marty Walsh said the change was made after consultation with public health officials, noting that in the last week Boston's COVID positivity rate jumped to 5.7 percent from 4.5 percent.

“The case numbers made the decision clear for me today, that preventing a surge has to be our priority,” Walsh said in an interview with GBH News. “The uptick we’re seeing in the last few weeks is continuing and potentially, potentially accelerating. That’s a problem.”

Special education students will not return to in-person learning until there are two full weeks of infection rates below 5 percent, he said. All other students will return when rates are below four percent.

Many parents said they were bitterly disappointed by the announcement as they juggle helping children learn remotely with work schedules both in and out of the home.

Keri Rodrigues, president of the National Parents Union, said other cities have figured out how to continue in-person and hybrid classes to bridge inequities in education that could result in learning losses for poor and underserved students. And she wondered why restaurants and other public services are allowed to continue operating despite a surge in cases.

“The city of Boston needs to crack down on the causes of this recent spike, including stricter enforcement of COVID-19 restrictions for area colleges and universities and public gatherings,” Rodrigues said in a statement. “Allowing in-person dining and looking the other way while colleges allow students to ignore COVID-19 mandates while continuing to keep Boston families in a state of chaos is ridiculous and unacceptable.”

When asked why the city has not yet instituted similar shutdowns for restaurants and other public amenities, Walsh said he is reviewing such measures. He also said that contrasting schools to restaurants is not a fair “apples to apples” comparison, because restaurants are operating mostly operating outdoors with better air circulation. Students attending school in person, he said, are in classrooms for four-to-six hours a day.

Earlier this month, the Boston Teachers Union sued the city, arguing its contract guaranteed all-remote learning once the citywide infection rate surpassed 4 percent. A Suffolk Superior Court judge ruled against the union last week, stating that it is up to Boston health officials to determine when schools are unsafe.

Walsh said Superintendent Brenda Cassellius met with parents of high-needs students on Wednesday to discuss getting them additional services.