Former Romanian President Ion Iliescu, who presided over the country's chaotic transition from communism to democracy, has died aged 95.

Iliescu had been diagnosed with lung cancer and hospitalised in early June in Romania's capital, Bucharest.

"It is with deep regret that the government announces the passing of the former President of Romania, Mr Ion Iliescu," a government statement said, adding that details of a state funeral would be shared soon.

Iliescu was Romania's first freely elected president, and served twice, from 1986-1996 and 2000-2004. He was accused of crimes against humanity over the violent revolt that toppled Romania's communist regime in 1989, but always denied wrongdoing.

Charges were brought in 2019, but he was never convicted.