At a news conference Sunday, Jan. 17, President Obama describes major developments in Iran this week including the release of Washington Post reporter, Jason Rezaian and three others. (The White House)

President Obama on Sunday defended his historic nuclear accord with Iran as proof that “smart, patient and disciplined” diplomacy can improve relations with a longtime foe, even as his administration announced new sanctions related to Tehran’s ­ballistic-missile program.

His declaration followed the lifting of many of the harshest international economic sanctions against Iran and confirmation that Iranian authorities had freed imprisoned Washington Post reporter Jason Rezaian and four other Americans.

The president’s remarks Sunday at the White House capped a dramatic two-day stretch that highlighted the complex and uncertain nature of the United States’ new relationship with one of its oldest and most determined enemies.

Obama’s critics have pilloried the nuclear deal, casting it as a capitulation to Iran’s ruling clerics and evidence of the president’s weakness on the world stage. Obama discussed the deal in a tone more sober than celebratory and acknowledged that “profound differences” remain between the two countries.

“The United States has never been afraid to pursue diplomacy with our adversaries,” he said, citing the examples of past presidents Franklin D. Roosevelt, John F. Kennedy and Ronald Reagan.

He spoke directly to young Iranians, holding out hope that his administration’s milestone foreign policy achievement could open up a pathway to a broader accord between two longtime foes.

“We have a rare chance to pursue a new path — a different, better future that delivers progress for both our people and the wider world,” he said. “That’s the opportunity for the Iranian people. We need to take advantage of that.”

Even as Obama spoke optimistically of a new era, there were reminders that the relationship between the United States and Iran remains dangerous and fraught.

Once the flight with the former prisoners was on its way, the ­administration announced new sanctions related to participation in Iran’s ballistic-missile program.

The measures apply to only 11 individuals and companies and are separate from the international sanctions related to Iran’s nuclear program that were lifted Saturday.

Iran’s effort to develop ballistic missiles capable of delivering a nuclear warhead “poses a significant threat to regional and global security, and it will continue to be subject to international sanctions,” said Adam J. Szubin, the acting undersecretary for terrorism and financial intelligence in the Treasury Department. Some in Congress have criticized Obama for not moving more swiftly to sanction Iran for its missile violations.

Obama highlighted the ongoing tensions between Iran and the United States. “We remain steadfast in opposing Iran’s de­stabilizing behavior elsewhere,” Obama said, “including its threats against Israel and our gulf partners, and its support for violent proxies in places like Syria and Yemen.”

U.S. imposes new sanctions over Iran missile tests

In a statement carried by Reuters on Monday, Iran’s Foreign Ministry replied that the “Islamic Republic will respond to these aggravating and propagandistic measures by pursuing its legal missile program stronger than before and developing its defensive capabilities.” 

Obama also spoke of Robert Levinson, an American who has been missing in Iran for eight years. Levinson’s whereabouts are not known, and it is unclear whether he is still alive. A former FBI agent, Levinson was sent to Iran by CIA officials who were not authorized to manage overseas operations.

Obama said Iran has agreed to “deepen coordination” as the United States works to find Levinson and reunite him with his wife and children. “We will never forget about Bob,” Obama said, adding that “we will not rest until their family is whole again.”

The president focused on new opportunities rather than dwelling on existing tensions. He praised the return of the Americans and the broader nuclear accord with Iran as proof of the United States’ influence in the world and the power of diplomacy.

“These things are a reminder of what we can achieve when we lead with strength and with wisdom, with courage and resolve and patience,” Obama said. “America can do — and has done — big things when we work together.”

He cast his approach as a better alternative to the more bellicose path of his Republican critics, who have blasted him for his caution and reluctance to confront Iran’s ruling clerics more forcefully.

The nuclear agreement and the release of the American prisoners were negotiated separately to ensure that the detainees were not used as leverage, U.S. officials said. But the completion of the nuclear deal last summer helped accelerate the talks about the prisoners, which loomed in the background of the negotiations.

The Americans were freed in exchange for U.S. clemency in the cases of seven Iranians charged or imprisoned over sanctions violations, and the dismissal of outstanding charges against 14 Iranians outside the United States. At least five of the Iranians granted pardons or sentence commutations intend to stay in the United States, their attorneys said.

Iran confirmed the release of Rezaian and the other American detainees just hours before diplomats in Vienna announced that Iran had fulfilled its promises under the nuclear accord.

The accord frees Iran from crippling sanctions and potentially offers a pathway for ending the country’s decades-long economic and diplomatic isolation.

The United States also agreed to pay Iran $1.7 billion to settle a 35-year-old claim on payments for military equipment the United States refused to deliver after the 1979 revolution and hostage crisis in Tehran.

The money has been tied up in a trust fund and in litigation at the Iran-U.S. Claims Tribunal in The Hague. U.S. officials cast the settlement as a less-risky alternative to fighting it out with Iran in court, where the United States could have been forced to pay billions more in penalties.

The big question for Obama and his successor is whether the United States and Iran can build on their fledgling relationship. The long and often-tense negotiations between Kerry and Iranian Foreign Minister Mohammad Javad Zarif also have opened up a channel for the United States to keep talking with its longtime foe.

Obama said that relationship was essential to freeing American sailors taken captive by Iran last week when U.S. officials said they accidentally sailed into Iranian waters. The sailors’ capture “could have sparked an international incident,” he said. Instead, U.S. and Iranian officials were able to resolve the situation in 24 hours.

The main forum for openings between the two countries going forward will be as part of long-shot peace talks to settle Syria’s bloody civil war. Iran has played a critical role in helping Syrian President Bashar al-Assad cling to power and will be essential to any deal to replace Assad and end the four-year-old war.

The nuclear deal also carries significant risks for Obama, who has touted the deal as among the most significant foreign policy achievements of his presidency.

Iran could use its $50­­ billion to $100 billion windfall from the nuclear accord to step up its support for terrorist groups and sow greater disorder in the Middle East. Big questions also remain about Iran’s willingness to live up to its obligations under the accord, including an unprecedented inspections program.

Israel’s government and members of Congress have condemned the deal as caving in to the demands of Iran’s clerical rulers and have said it doesn’t do enough to prevent Iran from acquiring a nuclear weapon.

Obama insisted that the accord with Iran provides no room for its ruling clerics to cheat. “If they try to build a bomb covertly, we will catch them,” he said.

In recent weeks, Iran has shipped 98 percent of its nuclear fuel out of the country, mothballed thousands of centrifuges used for enriching uranium and destroyed the core of a major nuclear reactor. Instead of being two to three months from acquiring enough fissile material to build a nuclear weapon, Obama said, it is now a year away.

Obama waited to speak Sunday until the American prisoners held by Iran had cleared Iranian airspace.

After the plane arrived in Germany, Obama telephoned Rezaian’s brother, Ali Rezaian, at Landstuhl medical center. In a call that lasted about two minutes, Obama told Ali that his brother’s detention had lasted “too long” and that he hoped Ali would be able to see him soon.

Rezaian and the other Americans were moved directly into the hospital for medical checks. Ali met with his mother, Mary, and Rezaian’s wife, Yeganeh Salehi, who had left Tehran on the plane with Rezaian and two of the other freed Americans.

Martin Baron, executive editor of The Post, and Douglas Jehl, the foreign editor, also met briefly with Salehi and Mary Rezaian and spoke briefly on the phone with Rezaian, who was calling from the hospital.

Asked how he was doing, Rezaian told The Post’s editors, “I’m a hell of a lot better than I was 48 hours ago.” He said that he found escape in the fiction he was allowed to read, and on Sunday he was avidly reading whatever he wanted, including stories about his captivity and release. He said it was strange to see himself being talked about so much, and the two Post editors replied that they “had been talking about him for 545 days.”

The support of The Post “means everything,” Rezaian told Baron and Jehl.

Obama had been harshly criticized for not making the prisoners’ release a precondition of the nuclear accord, and their freedom offered the president a measure of vindication.

In the White House, Obama read off each of their names and offered words of praise for their work in Iran. He described Rezaian as a “courageous journalist” who “embodies the brave spirit that gives life to the freedom of the press.” Saeed Abedini, a pastor from Idaho held for more than three years, had displayed “unyielding faith” that had inspired people around the world to fight for religious freedom, Obama said.

Even critics of the nuclear accord and his outreach to Iran should be willing to celebrate their release, Obama said.

“Today, we’re united in welcoming home sons and husbands and brothers who, in lonely prison cells, have endured an absolute nightmare,” Obama said. “But they never gave in, and they never gave up.”

William Branigin and Carol Morello in Washington and Andrew Roth in Landstuhl, Germany, contributed to this report.