TEHRAN, Iran -- Iran's supreme leader, Ayatollah Ali Khamenei, officially endorsed Hassan Rouhani as president in a ceremony Saturday on the eve of his swearing-in by parliament, acknowledging the challenges that he faces and asking the country to support him.
Mr. Rouhani, the moderate cleric who won an unexpected victory in the June 14 election and will begin his official duties today after being inaugurated as the Islamic Republic's 11th president, is making clear that he is determined to restore his country's image at home and abroad.
"We will take new steps to increase the dignity of our people in its international relations, through securing our national interests and eliminating the unjust sanctions," Mr. Rouhani said in an address during Saturday's ceremony, referring to measures imposed by the international community over Iran's nuclear activities.
He added that his administration's "approach will be to save the economy and to have constructive interaction with the rest of the world."
Dozens of foreign dignitaries, diplomats and senior Iranian officials attended the ceremony at Ayatollah Khamenei's central Tehran compound to mark the end of Mahmoud Ahmadinejad's controversial eight-year tenure. The supreme leader also delivered remarks that were carried live on domestic and international news networks.
Ayatolah Khamenei conceded that sanctions have created difficulties for Iranians but indicated that he did not fully agree with Mr. Rouhani's two-part approach to addressing them.
"It is correct that such pressures have created problems for people, but at the same time they have brought valuable experiences to our statesmen and people," Ayatollah Khamenei said. "The great lesson we have learned is that we have to rely solely on our powerful domestic capabilities and not put our hope in foreigners."
He also noted that Mr. Rouhani would need the support of the nation and the political establishment if he is to deliver on his campaign promises.
"I want everyone to help the government and president to realize people's expectations," Ayatollah Khamenei said.
Despite the multiple challenges that may limit Mr. Rouhani's effectiveness, a sense of cautious optimism has been palpable in the capital ahead of the inaugural weekend.
Several speeches given by Mr. Rouhani since he won the election have contributed to a general relaxation of social restrictions, which, even if temporary, is an important sign to Iranians that change is possible.
The infighting that dominated Iran's internal politics in recent years has also been replaced -- for now, at least -- by broad pledges of unity from across the political landscape.
And while there has been no news to suggest a reversal of pressures on the Iranian economy, the Iranian currency has strengthened since Mr. Rouhani's election, demonstrating the market's confidence in the president-elect's ability to steer Iran onto a more productive course.
On Wednesday, however, the U.S. House of Representatives overwhelmingly passed legislation that would result in the heaviest sanctions yet if approved by the Senate and signed into law. More sanctions, analysts say, would reduce Mr. Rouhani's ability to effect meaningful foreign-policy shifts.
"The track record over the past 15 years is clear," said Reza Marashi, research director for the National Iranian American Council. "Eased foreign tension empowers Iranian centrists and moderates, and increased foreign pressure cements the anti-Western narrative in Iran."
Mr. Rouhani's cabinet picks, analysts say, show that the new president recognizes the link between Iran's economic problems and its foreign policy, and that could help provide the opening needed to jump-start negotiations.
"The appointment of figures with experience in dealing with the West is a strong signal and gesture of the incoming president's foreign-policy priorities," said Mohammad Ali Shabani, a Tehran-based political analyst.
Another challenge Mr. Rouhani faces is the need to work with a parliament dominated by conservatives, many of whom oppose even a discussion about repairing relations with foreign powers.
Political infighting in recent years, especially between Mr. Ahmadinejad and his main foe, the current speaker of parliament, Ali Larijani, resulted in a series of mutual public attacks that angered many Iranians.
Mr. Larijani, who is likely to remain speaker, is thought to have a constructive relationship with Mr. Rouhani; both men are trusted advisers of the supreme leader and former lead nuclear negotiators.
"We have to see what the parliament does when Rouhani introduces his cabinet to them," said Hassan Beheshtipour, a Tehran-based analyst. "This will be the first test of his relationship with them, and I think the majority of lawmakers will help Rouhani implement his programs."
Ultimately, most Iranians hope Mr. Rouhani can overcome the profound differences that have divided Iran's leadership and society for nearly two decades.
"Rouhani is the best thing that could happen for the system right now," said Mehdi Saboohi, 38, a graduate student. "Only someone with his capacity can resolve the situation, because he is a cleric, is close to reformists and at the same time is loyal to the leader."