Egypt's ex-army chief, Abdel Fatah al-Sisi, was officially sworn in on Sunday morning as Egypt's fifth head of state since 2011, nearly a year after he ousted his predecessor Mohamed Morsi.

Sisi replaces the senior judge, Adly Mansour, whom Sisi himself appointed as interim president following Morsi's arrest last July, and whose term in office was almost as long as Morsi's.

Sisi's inauguration – marked by an impromptu public holiday – was attended by a number of Middle Eastern and African leaders, as well as the almost exclusively male members of Egypt's aging political elite. A small crowd of well-wishers also gathered outside Cairo's Nile-side constitutional court, where the inauguration took place, and where Morsi was himself sworn in under two years ago.

But the event was largely avoided by western governments, who have criticised Egypt's rights record in the 11 months since Morsi's overthrow, a period that has seen the largest spike in state-led violence in Egypt's recent history.

After a brief ceremony, Sisi became president with the words: "I swear by God to protect the republican system, to respect the constitution and the law, to safeguard the people's interests, and to preserve the independence of the nation and the unity of its lands."

His oath followed a laudation by the deputy head of the constitutional court, Maher Sami, in which Sami described Sisi as a "rebel soldier", and strived to present him as a revolutionary hero rather than as the mastermind of a controversial coup.

Sami said Sisi's election marked the reawakening of Egypt following three years of turmoil, and that his rise to power was not the product of "a military coup, but a revolution of the people, who were sick of all the troubles that had passed, and all the injustice that they had to face … The army embraced the people and listened to the heartbeats of the Egyptians who were burning with anger."

Earlier in the morning, the front page of a state-run newspaper, al-Akhbar, described Sisi as Egypt's "first patriotic elected president". It was a clear dig at Morsi, who was Egypt's first freely elected president, but whose critics said governed only in the interests of his Muslim Brotherhood.

Sisi, a career soldier, won over 96% of the vote in a presidential ballot to succeed Morsi last week. But his victory was tarnished by boycotts by a number of credible challengers, who said it would be impossible to campaign against him amid a crackdown on dissent, and a series of last-minute state-led attempts to increase turnout.

Sisi inherits a country beset by many of the same challenges that brought down his predecessors Morsi and Hosni Mubarak – problems that analysts warn may also cause his own popularity to wane quickly.

Additional reporting by Manu Abdo