Libyan Prime Minister Ali Zeidan has been freed by his captors after an hourslong kidnapping, Reuters reported Thursday.

According to the report, Zeidan was kidnapped from a Tripoli hotel, where he lives under tight security, held for six hours, and then freed after a small gunfight.

Zeidan was taken hostage by rebel gunman in retaliation for a U.S. raid over the weekend that resulted in the capture of Abu Anas al-Libi, a top terror suspect wanted for his role in the 1998 U.S. Embassy bombings in Kenya and Tanzania.

The rebels said they took Zeidan after Secretary of State John KerryJohn KerryKerry: Trump can’t instantly undo Obama actions ‘All or nothing’ leaves us nothing Kerry: Trump comments on German chancellor ‘inappropriate’ MORE said the Libyan government had a role in helping the U.S. capture al-Libi.

Some civil rights groups have questioned the U.S.’s seizure and interrogation of al-Libi, who has been kept aboard a Navy ship since his capture.

At a Wednesday press conference, Obama dodged a question about the legality of al-Libi’s arrest, but argued the terror suspect had been indicted by a federal court and needed to “be brought to justice.”

“We know that Mr. al-Libi planned and helped execute plots that killed hundreds of people, a whole lot of Americans,” Obama said. “And we have strong evidence of that. And he will be brought to justice.”