Updated

Ghana's Supreme Court has declared "unconstitutional" the decision by former President John Mahama to allow two former Guantanamo Bay detainees entry into the West African country.

The court ruled Thursday that the ex-president needed to get parliamentary approval for the transfer. It said parliament has three months to approve the transfer of the detainees.

Mahmud Umar Muhammad Bin Atef and Khalid Muhammad Salih Al-Dhuby had been held as enemy combatants but were cleared for release in 2009. The two Yemenis were the first Guantanamo prisoners resettled in sub-Saharan Africa and arrived in January 2016.

Mahama has said the detainees were taken in after a direct request by the United States government and did not pose a security threat. Several religious and civil society groups protested their transfer to Ghana.