He was taken into custody on suspicion of being an al-Qaeda agent, having been arrested along with a number of other al-Qaeda operatives.
Following a lobbying effort by Swedish prime minister Göran Persson, Guantánamo authorities recommended Ghezali be transferred to another country for continued detainment, and he was handed over to Swedish authorities in 2004. The Swedish government did not press charges.