Karim Wade, the convicted son of former Senegalese president Abdoulaye Wade, has been released from prison in Senegal after being granted a presidential pardon.

Wade was immediately flown to Qatar after President Macky Sall's decree early Friday, local media reported.

He was initially sentenced in 2012 to six years in prison and a fine of $240m for illegally accumulating at least $200m while serving as a minister during his father's 12-year rule.

The court ruling said that Wade had hidden away funds in offshore companies in the British Virgin Islands and Panama.

READ MORE: Senegal jails former president's son for corruption

Despite only serving three years of his full sentence, the pardon cancels the Supreme Court's decision to jail him. A press release from the presidency said the payment of the fine was not covered by the pardon.

Wade was a senior minister in his father's government, and was in charge of major infrastructure and energy projects. His large portfolio led to him being dubbed "the minister of the earth and the sky".

His arrest came after the new government led by President Sall since 2012 vowed to tackle corruption.

Wade denies the charges and his supporters claim that the case against him was a political move intended to eliminate dissent.

The country's main opposition party, the Senegalese Democratic Party, chose Wade as their presidential candidate for the 2019 polls while he was in prison.

It is unclear whether he is still eligible to run for the presidency.