TEHRAN, Iran — Iran's supreme leader formally endorsed Hasan Rouhani as president Saturday, allowing the moderate cleric to take charge of a country weakened by economic sanctions over its nuclear program.

Rouhani sat cross-legged on a mat on Ayatollah Ali Khamenei's left as he spoke during the ceremony broadcast live on state television. On Khamenei's right sat outgoing President Mahmoud Ahmadinejad, whose hardline policies raised tensions between Iran and Western powers since he took power in 2005.

Speaking at the event, Rouhani again pledged to follow a path of moderation and work to get Western sanctions over Iran's suspect nuclear program lifted. Iran is under United Nations sanctions as well as unilateral Western oil and banking sanctions over its refusal to halt uranium enrichment, a technology that can be used to power reactors producing electricity or build nuclear weapons.

Iran says its nuclear program is peaceful and geared towards generating electricity and producing radioisotopes to treat cancer patients.

"The government's (goal) will be to tackle people's living issues. ... In parallel, it will take new steps in the arena of international relations to improve Iran's standing on the basis of meeting national interests and remove the current oppressive sanctions," Rouhani said.

Rouhani won a landslide victory in the June 14 presidential elections, defeating his hardline rivals. He is widely seen as a mirror image of former powerful president Akbar Hashemi Rafsanjani, who believes Tehran can maintain its nuclear program and ease tensions with the West at the same time.

Rouhani offered no specifics Saturday on what Iran would offer Western powers and the U.N. to ease sanctions. The incoming president himself is a former top nuclear negotiator and the core of his team has figures whose academic pedigrees include institutions in California, Washington and London.

The Western-looking credentials of Rouhani's inner circle are no surprise. Rouhani himself studied in Scotland. What remains unclear, however, is how much they could actually influence Iranian policies and foster potential outreach diplomacy such as direct talks with the U.S. or possible breakthroughs in wider negotiations over Tehran's nuclear program.

Khamenei, the ultimate authority in Iran, has final say in all key matters, including Rouhani's upcoming selections for key Cabinet posts such as the foreign and intelligence ministers. Rouhani kissed Khamenei's clerical robe during the ceremony but avoided kissing the cleric's hand, something Ahmadinejad did in 2005. Khamenei kissed Rouhani's forehead in a blessing.

A top North Korean leader, Kim Yong Nam, also was the first foreign official to meet with Rouhani on Saturday.

In his speech Saturday, Rouhani insisted that resolving the country's pressing economic problems is his top priority. Sanctions have hit the country's vital oil exports and blocked transactions on international banking networks. Inflation is running at more than 25 percent. The value of the Iranian rial has lost more than two-thirds of its value against the U.S. dollar since late 2011.

"The government's direction will be to save Iran's economy ... and interact constructively with the world," he said.

Minutes after the ceremony, Ahmadinejad handed over the presidential palace in the heart of Tehran to Rouhani.

Rouhani will take the oath of office in parliament Sunday. He is expected to unveil his proposed Cabinet list the same day.