The West Village artists are fortifying their foothold.

Westbeth Artists Residences, believed to be the only National Endowment for the Arts-subsidized housing site in the country, said Wednesday it had begun a two-year, $40 million endeavor to shore up the West Village development from future flooding.

Water rushed into the basement of the 384-unit development during superstorm Sandy in 2012, knocking out its electrical equipment, boilers, pumps and elevators. Westbeth has since recovered, and secured $40 million in federal disaster relief funds to prepare for future storms.

That money will ensure that Westbeth does not need to raise rents to fund the work, according to Donald Sutton, vice chairman of the Westbeth Board of Directors.

“We would have had to go out and raise $40 million or so to do this work — it’s all necessary work,” Sutton said. “What’s being built back is built in resistance to Sandy plus another foot or so of water.”

Over the next two years, the storm-damaged courtyard will be fixed. Boilers will be elevated above the flood level. And workers will install pumps that can remove water if it seeps into the basement as well as an emergency generator capable of running the boilers, water pumps and elevators.

Westbeth opened its doors in the 1970s in the campus once used by Bell Laboratories. Much of the construction and refurbishment was funded by private sources. But the National Endowment for the Arts also contributed, which Sutton said is believed to be the organziation’s first and only assistance to a housing site.

Beyond subsidized rents, Westbeth provided some 100 work spaces for artists. Tenants include The Martha Graham Dance Co. and the New School’s graduate theater program.

“[Westbeth] opened as a facility to house New York City resident artists on a subsidized basis and enhance the city’s cutural primacy by ensuring that artists were able to stay in the city,” Sutton said of a landmarked development once home to photographer Diane Arbus, actor Moses Gunn and Robert De Niro Sr., a painter and the father of the actor, Robert De Niro.

Over the years, updated building codes have rendered some of the studio spaces unusable, and Sandy damaged another 40 studio spaces set aside for artists working with hazardous materials, Sutton said.

Currently, Sutton estimated just 20 work spaces are available for performance artists, who do not need the ventilation systems required for working with hazardous materials.

“We’re looking for private and government sources which will support space for artists — work space,” he said, referencing the need to repair some studio spaces and install ventilation systems before allowing people to work in them. “That’s kind of few and far between. We are looking though, and it’s an ongoing objective.”