Hassan al-Turabi, the Sudanese opposition leader who helped bring President Omar al-Bashir to power, has died at 84 in the capital Khartoum.
A hospital source told AFP news agency he had suffered a heart attack.
Mr Turabi was a key ally of Mr Bashir when he took power in a coup in 1989 but they fell out a decade later.
He was one of the most divisive figures in the country's turbulent history, says the BBC's former Sudan correspondent, James Copnall.
For the first decade of Mr Bashir's rule, Mr Turabi was the de facto leader of the country, and his influence spread beyond Sudan's borders.
His death was announced by state TV, which described him as a "well-known Islamic thinker", and was confirmed by his party.
During his years of ascendancy, he promoted a radical version of Islamism, with sharia, or Islamic, law applied strictly,
Osama bin Laden accepted an invitation to live in Sudan, and the civil war against the largely non-Muslim southern Sudanese was intensified.
The Sudanese security services were accused of numerous human rights abuses against dissidents. Large numbers of Sudanese fled the country.
One, a Karate black belt, attacked Mr Turabi in the Canadian capital Ottawa in 1992, leaving him in a coma, but Mr Turabi survived.
In 1999, he lost a power struggle with Mr Bashir and subsequently founded an opposition party but spent much of the next decade in prison.
In March 2014, the two men had their first public meeting in years, with Mr Turabi visiting President Bashir at his guest house.
Born in Kassala in eastern Sudan, the son of a local imam, Mr Turabi moved to Khartoum to study law before completing his studies in London and Paris.
He joined Sudan's Muslim Brotherhood and rose to national prominence in the 1964 revolution which overthrew General Ibrahim Abboud.
A widely read man with a high-pitched giggle, Mr Turabi was famous for his comprehensive - some would say rambling - interviews, our correspondent says.
Mr Turabi advocated the rights of women and democracy within Islam, and saw himself as a moderate reformer - but he presided over perhaps the most brutal period in Sudan's history, James Copnall adds.