Thousands of Romanians lined the streets of Bucharest on Saturday for the funeral of the country’s former king Michael, one of the last surviving World War Two European heads of state.

Born in 1921, Michael ruled Romania twice, switched its alliance away from Nazi Germany to the Allied side during the war and was subsequently forced into exile by a Communist takeover in 1947.

He died in Switzerland on Dec. 5 at the age of 96, having retired from public life due to severe illness in 2016.

On Saturday, Bucharest churches rang their bells and mourners, many in tears, threw white flowers at the funeral procession, chanting “King Michael” and “Down with communism”.

European royalty attended, including Spain’s former king, Juan Carlos, Britain’s Prince Charles, King Carl Gustaf of Sweden and his wife Queen Silvia.

Even though the restoration of the monarchy is not an issue in the European Union state, Michael commanded great respect from Romanians who saw him in sharp opposition to a political class which they link with poverty and corruption.

His death comes at a time of deep divisions in Romanian society. Massive street protests against attempts by the ruling Social Democrats to weaken the fight against corruption and the rule of law have taken place on and off throughout 2017.

Earlier this month, the Social Democrats used their solid majority to approve a judicial overhaul in the lower house that threatens to put the justice system under political control. On Monday, lawmakers begin debating changes to the criminal code that critics say will derail law and order.

A descendant of the German Hohenzollern dynasty and a cousin of Britain’s Queen Elizabeth, Michael was in his early twenties when he participated in a 1944 coup that overthrew fascist leader Marshal Ion Antonescu.

Romania then broke with Nazi Germany and switched to the Allied side. Historians have said his actions might have shortened the war and saved thousands of lives.

After communism collapsed, politicians fearing Michael’s influence blocked his first few attempted visits after decades of exile in Switzerland, Britain and the United States. He finally returned to Romania in 1992 and regained citizenship in 1997.

With his passing, the Romanian royal family’s relevance will likely fade, since his children have little public standing. Princess Margareta, his eldest daughter, remains custodian of the crown.