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 Forbes KerryShould President Trump, like President Obama, forsake human rights in pursuit of the deal with a tyrant? GOP Senate report says Obama officials gave Iran access to US financial system Democrats conflicted over how hard to hit Trump on Iran 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.”