After the turmoil of the last two months, it was a moment when Mahmoud Ahmadinejad could attempt to restore his dignity.
This time the drama was neatly choreographed as the oath was administered.
The hugs, handshakes and kisses all in proper order, unlike the awkward moment on Monday when he was officially endorsed by the supreme leader, Ayatollah Khamenei.
But in front of the president were a number of empty seats, as some MPs and other senior figures boycotted the ceremony.
The British and European ambassadors did attend, but Western governments declined to send messages of congratulations.
And, as his second term begins, Mr Ahmadinejad faces an increasing series of problems.
There are the demonstrations on the streets.
For the moment they do not look big enough to unseat him, but by their sheer persistence, the protestors are rattling the government, keeping it off balance.
And there is always the possibility of a much bigger explosion of protests, if the government tried to arrest the opposition leaders, or perhaps when students return to university in October.
The split at the heart of the Iranian political establishment was confirmed by the boycott of the ceremony by all three opposition presidential candidates, Mir Hossein Mousavi, Mehdi Karroubi, Mohsen Rezai, as well as the two former presidents.
But Mr Ahmadinejad will be equally worried a… >>>