Iran's supreme leader Ayatollah Ali Khamenei on Sunday formally endorsed Masoud Pezeshkian as the Islamic republic's ninth president, after he won a snap election earlier this month pledging reforms.
Mr Pezeshkian, a reformist who will be sworn in before parliament on Tuesday, is taking office at a time of heightened tension in the Middle East as fighting escalates between Israel and Iranian allies.
The endorsement ceremony, held in Tehran, was broadcast live on state television as banks and most government offices were shut to tackle a heatwave.
"I endorse his excellency Dr Masoud Pezeshkian as the president of the Islamic republic of Iran," said a decree by the supreme leader, read out by the director of his office.
Although a moderate, Mr Pezeshkian is not expected to bring about any radical shifts in foreign, domestic, or nuclear policy, as the supreme leader remains at the helm of all state affairs.
Foreign policy is not a matter decided by the Iranian president, but by Iran’s Islamic Revolutionary Guard Corps who answer to Mr Khamenei.
In his speech during the ceremony, Mr Khamenei reiterated Iran's anti-Israeli stance and praised Palestinian armed group Hamas for its resistance in Gaza.
Mr Pezeshkian vowed to adhere to the law and religious values, vowing that his administration will serve the people and "take no path but the path of justice and fairness".
Following the ceremony, acting president Mohammad Mokhber handed over to Mr Pezeshkian.
Mr Pezeshkian won a run-off race against ultraconservative Saeed Jalili on July 5 to replace president Ebrahim Raisi who died in a helicopter crash in May alongside other top officials.
Mr Raisi was a hardliner and his replacement has sparked hopes of a thaw in relations between Iran and the West, particularly with regards to nuclear issues.
During the ceremony, Mr Khamenei suggested he may be open to improving ties.
"We have no intention to oppose some European countries. The reason I did not mention European countries as a priority is that they have not treated us well for many years," he said.
If European countries did not "have this bad attitude" then mending ties "would be one of our priorities," he added.
Mr Khamenei stressed the importance of adopting an "active and effective" response to regional developments and that diplomacy should prioritise neighbouring countries.
He secured about 54 per cent of the 30 million ballots cast.
Later on Sunday, Mr Pezeshkian appointed reformist Mohammad Reza Aref, 72, as his first vice president, according to Iranian state media.
Mr Aref previously served as a vice president under former reformist President Mohammad Khatami from 2001 to 2005. The appointment marks the new president's first official act since assuming the position.