Libyan Prime Minister Ali Zeidan was taken by force from a hotel in Tripoli early Thursday but freed by his captors hours later, the country's Ministry for Information spokesman said.
His detention came days after militant groups pledged to retaliate over a raid by U.S. special forces to seize al Qaeda suspect Abu Anas al-Libi.
About 100 trucks of armed men arrived at dawn at the Corinithian Hotel where Zedian was living, and he was taken without an exchange of fire, a senior government official said.
Zeidan was taken "by gunmen to an unknown place for unknown reasons," a government statement said.
He was freed unharmed but the incident underlined the anarchy prevailing in the oil-rich North African state, two years after the Western-backed overthrow of Muammar Gaddafi.
"Libyans need wisdom ... not escalation ... to deal with this situation," he told his cabinet in remarks broadcast on television after his six-hour ordeal in the capital, according to Reuters.
Before the prime minister's release, Saudi TV channel Al Arabiya broadcast images of a disheveled man it said was the prime minister being escorted by armed men.
A group known as the Operations Room of Libya's Revolutionaries, which was hired to provide security in Tripoli, claimed to be behind the incident. It told Reuters it had “arrested” the prime minster in response to Saturday's raid.
The former militants said they believed Zeidan's administration colluded with the U.S. in the raids, something the Libyan government has so far denied. According to a government official, the group claims it was acting based on an investigation by the government's anti-corruption unit.
Zeidan has been the focus of internal investigations involving bribes and corruption, but neither the ministry for the interior nor the general prosecutor have given an order for his arrest.
The senior government official told NBC News they did not consider Zeidan's abduction to be a "kidnapping."
Following al-Libi's capture on Saturday, Zeidan had called on the U.S. to explain its actions and had met with al-Libi's family late Wednesday, hours before the prime minister was taken.