Southside Hospital in Bay Shore was awarded a $23.7 million federal grant to upgrade buildings and systems to help keep it open during storms and floods, officials said Friday.

“Hospitals need to be able to operate and serve their communities no matter the circumstances,” said Gov. Andrew M. Cuomo in a statement joined by Sen. Chuck Schumer (D-N.Y.), and Rep. Peter King (R-Seaford).

Last year, both Southside and West Islip’s Good Samaritan Hospital Medical Center and Our Lady of Consolation applied for Federal Emergency Management Agency grants to pay for anti-flood measures.

The New York State Division of Homeland Security and Emergency Services could not immediately provide the status of Good Samaritan’s request for a $20.1 million grant.

The two hospitals are located near the Great South Bay, which heightens the hazards storms pose.

“We are only a block away from the Great South Bay,” Anthony Pellicone, Southside associate director, said Friday by telephone.

advertisement | advertise on newsday

Superstorm Sandy in 2012 caused $3 million in damage, as water pooled around the building’s doors and covered much of the first floor, he said.

One year before that, tropical storm Irene caused many of the same problems.

The new grant will enable Southside to replace and move emergency generators, mechanical, electrical, telephone and information systems to the second floor from the first floor, Pellicone said.

The building’s outer shell will be reinforced and hurricane-proof windows installed. So will new valves to prevent storm drains from letting floodwaters pour in, Pellicone said.

The aim is to ensure the 321-bed hospital can withstand a 500-year storm, he said.

Currently, even much less powerful storms cause problems.

“We’ve had some very freakish summer storms that have flooded this hospital three times in the last two years,” he said.

FEMA requires Southside to pay 25 percent of the award and all improvements must be completed by May 10, 2019, he said.