CAIRO - Hard-liners in Iran and the Israeli government both condemned the framework deal on curbing Tehran's nuclear program on Friday, from opposite directions but for the same reason: The agreement, they said, gives away too much.

Israeli Prime Minister Benjamin Netanyahu said the understandings fail to outright shut down any of Iran's nuclear facilities, while legitimizing its uranium-enrichment program and leaving it with an infrastructure that could eventually be capable of producing a bomb.

He warned that the deal "threatens the very survival" of Israel, and put forward a new demand, that any final deal include Iran's recognition of Israel's right to exist.

Iran's powerful hard-liners, meanwhile, pointed to the heavy restrictions that would effectively lock those facilities and enrichment into a slow lane for at least a decade. They accused the government of moderate President Hassan Rouhani of surrendering a nuclear program that Iran has boasted for years demonstrates its technological prowess, self-sufficiency, and defiance of the West.

"We gave up a race-ready horse and we got in return a broken bridle," Hossein Shariatmadari, an adviser to Supreme Leader Ayatollah Ali Khamenei and editor of the hard-line Kayhan newspaper, told the semiofficial Fars news agency.

The reactions underscore the pressures that will weigh on Western and Iranian negotiators as they now work to turn the broad understandings into a detailed accord by June 30 - and raise questions about how far detractors on both sides will go to try to prevent a final agreement.

Or if they can. The framework won praise from Western governments and from many in Iran who want its provisions for the lifting of sanctions that have long crippled the economy.

Iranian Foreign Minister Mohammad Javad Zarif, who signed the agreement Thursday, received a hero's welcome upon his return to Tehran from the latest round of talks in Lausanne, Switzerland. Crowds of cheering supporters surrounded Zarif's vehicle on Friday as he stood out of its sunroof shaking hands with them. Some chanted sarcastic condolences to both Israel and Iranian hard-liners. Celebrations continued into the night, with hundreds of flag-waving supporters singing and dancing in Tehran's main squares.

In a speech to the nation, Rouhani vowed that Iranians will "remain loyal and stand by the promises" they made.

Much depends on Iran's supreme leader, Khamenei, who holds the final say on all political matters. There was no immediate comment from him Friday to judge how he was leaning on the framework understandings. From the start, Khamenei expressed skepticism that the negotiations would succeed, but he allowed them to go on.

A key U.S. ally, Saudi Arabia, appeared to be withholding judgment. The Sunni kingdom, which is a major rival to Shiite-led Iran, has feared an agreement would leave Tehran within reach of one day building a nuclear bomb and would indirectly legitimize Tehran's power around the Middle East.

Speaking to President Obama by phone late Thursday, Saudi King Salman expressed his hope that "a binding final deal is reached that leads to the strengthening of the region's security and stability," according to the Saudi state news agency.

The core of the understandings are provisions that dramatically restrain Iran's nuclear facilities that have been rapidly advancing for years and that hard-liners have insisted should not be limited - even as they say they are not intended to produce a bomb.

According to the framework deal, Tehran would be allowed to operate only a few more than 5,000 of the nearly 20,000 centrifuges it has installed at its main enrichment site. Much of its enriched stockpiles would be neutralized, and a planned reactor would be reconstructed so it can't produce weapons-grade plutonium.

Monitoring and inspections by the U.N. nuclear agency would be enhanced, and uranium enrichment would be halted at an underground, heavily fortified, once-secret facility at Fordow, which would be made into a nuclear research facility. The restrictions would last for 10 or 15 years.

Western negotiators say that under those conditions Iran cannot produce a weapon and, if it breaks the accord, it would still be unable to do so for another year. Israel contends that Iran cannot be trusted and that leaving certain facilities intact would allow the Iranians to eventually build a bomb.

Rather than blocking the path to a bomb, "such a deal paves Iran's path to the bomb," Netanyahu said.