After years of financial uncertainty and weeks of hardship caused by Hurricane Maria, staff at the legendary Arecibo Observatory in Puerto Rico were relieved to find out Thursday that their telescope will remain operational.

For about a decade, the National Science Foundation, which owns the observatory and supplies about two-thirds of its $12 million budget, had been mulling downsizing or even shuttering the telescope to free up funds for other projects. Instead, the NSF will continue scientific operations at the facility in collaboration with an unnamed partner organization, according to a Record of Decision signed this week.

Arecibo sustained $4 million to $8 million in damage during the hurricane, according James Ulvestad, acting assistant director for the agency's mathematical and physical sciences directorate. Some scientists worried that would weaken the case for keeping the observatory operational.

But Ulvestad said the agency's Record of Decision reflects that it has received viable partnership proposals from one or more collaborators — though he would not provide details about those proposals. This announcement allows the NSF to move forward with negotiations on a new management contract.

Under the new plan, the agency will reduce its annual contribution to the observatory from about $8.2 million to $2 million over the next five years. It is also committed to funding any repairs required to restore Arecibo to its pre-hurricane condition, Ulvestad said.

In deciding the future of the observatory, the NSF conducted an environmental-impact statement and considered four other alternatives to the current plan. Those included operating Arecibo solely as an educational facility, mothballing the observatory or demolishing it. Ulvestad said that finding a partner organization to maintain scientific operations was its preferred option.

“It was never our intention to shutter Arecibo,” he added. “Getting viable collaborators identified through our solicitation process is what enabled us to make this decision and turn it from a preferred alternative to the alternative.”

In January, the NSF issued a call for proposals from prospective partners to run the observatory. To maintain current operations — which include radio studies of pulsars and Earth's ionosphere — any partner would have to make up for the reduced NSF funds. Arecibo also receives about $3.5 million from NASA for its planetary radar projects, such as searching for near-Earth asteroids. According to Ulvestad, partners were given broad scope to determine what kind of projects the observatory would pursue under their management.

“Until we actually negotiate an agreement and make that decision public, I can't really speak to exactly which programs” will continue, Ulvestad said. But, he added, “we have viable proposals that we think will continue to deliver the science that we are interested in.”

The decision to keep Arecibo open was met with jubilation from scientists in Puerto Rico and around the world.

“I AM LITERALLY CRYING AT WORK! TEARS OF JOY!!! THE OBSERVATORY SURVIVES!!!” tweeted Ed Rivera-Valentin, a planetary scientist who works at Arecibo and the Lunar and Planetary Institute in Houston.

“Things are looking up for continued great science from Arecibo,” responded Bob Pappalardo of NASA's Jet Propulsion Laboratory in Pasadena, Calif.

The observatory in northwestern Puerto Rico boasts one of the world's biggest radio telescopes, and it looms large in the pantheon of astronomical instruments. Arecibo's huge primary dish, built into a sinkhole in a mountain range, has been used to discover the first exoplanets and detect organic molecules in a galaxy millions of light-years away. It's where the fictional astronomer Ellie Arroway got her start in the movie “Contact” and where real scientists Frank Drake, Jill Tarter and Carl Sagan, among others, launched efforts to detect extraterrestrial life.

Arecibo was battered, but not broken, when Hurricane Maria swept through Puerto Rico in September, submerging roads, knocking out power lines and devastating communities. Several of the observatory's 100 or so staff members sheltered at the observatory. They made it safely through the storm, but some have been living without reliable electricity, water and phone service in the two months since the hurricane. Last week, the Universities Space Research Association — a group that helps run the observatory — sent 20 generators to its employees who still lacked power at their homes.

Universities Space Research Association said in September that the 1,000-foot primary dish and other major structures were intact after Maria, but some other instruments were destroyed by falling debris, including much of a 95-foot antenna and a smaller radio dish.

Because of the damage to Puerto Rico's power grid, the entire observatory has been running on generators since the storm, and it still hasn't resumed normal operations. Observations with the main dish picked back up this month — the journal Nature pointed out that it has already detected a fast radio burst, an enigmatic astronomical phenomenon that is best observed by large radio telescopes such as Arecibo.

Given the high demand for fuel on the island, though, the dish is operating in lower-power mode, without the function that lets astronomers aim the telescope at different areas of the sky.

But the first priority is the well-being of people in Puerto Rico, not astronomy. According to the journal Science, observatory staff volunteered their services, communicating via ham radio and handing out water in Maria's aftermath. The observatory's generators, storage space and fresh water from its well have also been shared with surrounding communities.

Ulvestad said that the NSF aims to send program officers to Puerto Rico sometime in the next two months to assess the damage to the observatory.