Stony Brook University residents had to vacate residence halls and campus apartments by Friday afternoon as the school prepared its facilities to treat an overflow of patients with coronavirus or to house hospital workers.

“To the extent our medical facilities get outstripped in terms of capacity, the campus is well-poised to provide space and opportunity for additional capacity whether it’s to treat patients or to house people, including staff who might need it,” Michael Bernstein, Stony Brook University's interim president, said this week in a Facebook video posted on the university’s page.

The campus on Wednesday became Long Island's second drive-thru coronavirus testing site. The first site was at Jones Beach State Park. Other drive-thru testing sites were set up this week in Jericho and Little Neck, Queens, by Lake Success-based ProHEALTH, for ProHEALTH patients.

Stony Brook University Hospital has 624 beds, but hospital officials said the goal is to double its capacity.

Up to 450 beds can be added by re-purposing large areas within Stony Brook University, said Dean Tufts, vice president of facilities and services at the university.

As officials began to prepare facilities to make room for more patients, there was a growing need to decrease the number of students living on campus.

A note to our community: As a public service, this article is available for all. Newsday readers support our strong local journalism by subscribing. Please show you value this important work by becoming a subscriber now. SUBSCRIBE Cancel anytime

The decision to close on-campus housing was made "in an effort to significantly reduce the population density on campus and ensure social distancing measures to reduce the risk of COVID-19 transmission," university officials said in a statement.

While residents were away for spring break, they were given short notice to return to campus to collect their belongings by Thursday afternoon if they live within driving distance of the campus, or by Friday at 5 p.m. for all other residents. Those who live abroad or who don’t have a home or safe place to return to were asked to fill out a form requesting to stay.

“We have a bit over 10,000 student residents. When we started spring break last weekend, we ended up with 6,000 who enjoy being on campus. Our goal is to try to get to about 2,000 or a few more than that because that's what we think we can manage,” Bernstein said.

The university, working with the state Office of General Services, National Guard and Army Corps of Engineers, could build a temporary hospital at its sports facilities, as well as the student activity center, Tufts said.

"The normal hospital patients would go there, so the hospital could focus on COVID-19 patients," Tufts said.