Updated

Egypt's chief justice Adly Mansour was sworn in as the country's interim president on Thursday, a day after the military ousted and detained Mohamed Morsi following days of massive protests.

"I swear to preserve the system of the republic, and respect the constitution and law, and guard the people's interests," Mansour said as he took the oath of office at a ceremony in the Supreme Constitutional Court.

Officials welcomed the declaration with a warm round of applause.

Mansour went on to pay tribute to the Egyptian people, media, the military and the police force.

"A salute to the Egyptian people for correcting on June 30 the path of this glorious revolution," he said in reference to protests that saw millions take to the streets on the anniversary of Morsi's first turbulent year in power.

The nationwide protests "proved to the world" the determination of Egyptians in the face of adversity, said Mansour.

The 67-year-old praised the armed forces for having "always been the conscience of the nation" and "not hesitating for a moment to meet the call of the nation and people".

Mansour also described the Egyptian media as a "courageous free beacon that lit the way for the people and unveiled the misdeeds of the former regime".

The swearing-in ceremony, which was broadcast live on national television, came after the military swept aside Morsi on Wednesday, a little more than a year after the Islamist leader took office.

A senior military officer told AFP the army was now "preventively" holding Morsi.

The ousted president's government unravelled after the army gave him a 48-hour ultimatum in the wake of massive demonstrations against him on the June 30 anniversary of his maiden year in office.