KHARTOUM (Reuters) - Leading Sudanese opposition figure Sadiq al-Mahdi returned to Sudan on Thursday after spending two years in exile, telling his supporters that he has returned to achieve peace and democracy.

Mahdi, who heads one of Sudan’s oldest political parties, was the country’s last democratically elected prime minister.

He was overthrown in 1989 by an alliance of Islamists and military commanders that still form the nucleus of President Omar Hassan al-Bashir’s all-powerful National Congress Party.

Sudan’s government had accused Mahdi in 2014 of conspiring with armed rebels, a charge that could carry the death penalty, leading him to seek refuge in Cairo.

“I have returned to the country to stop war, achieve peace and set up democracy and restitution of rights,” Mahdi said in a speech at a public square after leaving Khartoum airport.

Around 6,000 of his supporters raised his party’s flag and chanted to welcome him.

“I will work to fight Islamic extremist groups and revive moderate Islam,” he said.