Mudawi Ibrahim Adam was arrested in December 2016 as part of a crackdown against opposition leaders and activists
Sudanese President Omar al-Bashir on Tuesday pardoned a leading human rights activist who was facing trial on charges of spying for foreign embassies, state media reported.
Mudawi Ibrahim Adam, an engineering professor at the University of Khartoum, was arrested by security forces in December as part of a crackdown against opposition leaders and activists.
Under Sudanese law, the charges against him were punishable by death.
Prosecutors had accused Ibrahim Adam of being among activists who were running a criminal organisation and engaged in spying and intelligence activities for foreign embassies.
Ibrahim Adam and others were also accused of "publishing lies about [government forces] using chemical weapons" during fighting with rebels in the country's conflict zones.
But on Tuesday, Bashir issued a presidential decree pardoning Ibrahim Adam and five other activists.
"I am issuing a decision to pardon... Dr Mudawi Ibrahim Adam," Bashir said in a decree signed on Tuesday and quoted by the official SUNA news agency.
Ibrahim Adam was released from detention later on Tuesday.
"He has just arrived home and is in good health," his wife Sabah Adam told AFP.
Bashir also pardoned five other activists, SUNA said.
Several opposition leaders and activists were detained in December in a bid to crush widespread protests against a government decision to raise fuel prices.
Ibrahim Adam, who has worked extensively on human rights issues in Sudan, has been arrested several times for his work. The government shut down a development organisation he headed in 2009.
Global rights groups condemned Sudanese authorities over his arrest.
Ibrahim Adam's "arbitrary arrest underscores the government's desperate attempts to extinguish the last embers of dissent in the country," Amnesty International said soon after he was detained.