Libyan Prime Minister Ali Zeidan has accused a "political party" of organising his brief abduction by armed gunmen on Thursday, the latest example of the lawlessness prevailing since Muammar Gaddafi's overthrow.
The premier appeared in good health when he arrived at government headquarters after his ordeal, waving to waiting well-wishers as he climbed out of an armoured car.
"I hope this problem will be resolved with reason and wisdom" and without any "escalation," Zeidan later said in comments broadcast by state television as he left a cabinet meeting.
The pre-dawn seizure of Zeidan came five days after US commandos embarrassed and angered the government by capturing senior Al-Qaeda suspect Abu Anas al-Libi on the streets of Tripoli, whisking him away to a warship in the Mediterranean.
Witnesses said Zeidan was held at a police station south of the capital, and that his captors released him after armed residents surrounded the building and demanded he be let go.
An employee at the hotel -- where Zeidan had taken up residence for security reasons -- told AFP a "large number of armed men" had entered the building but that the staff did not know what was happening.
A Libyan government statement said Zeidan had been taken "to an unknown destination for unknown reasons by a group" of men believed to be former rebels.
In comments made later to France24 television, Zeidan accused a "political party" of organising the kidnapping him, without naming the group.
"It's a political party which wants to overthrow the government by any means," he said.
"In the coming days I will give more information on who this political party is that organised my kidnapping," Zeidan added.
After being freed, Zeidan met with his ministers and members of the General National Congress (GNC) -- Libya's highest political authority.
The Operations Cell of Libyan Revolutionaries, former rebels who had roundly denounced Libi's abduction and blamed Zeidan's government for it, said it had "arrested" the premier under orders from the public prosecutor.
But the cabinet said on its Facebook page that ministers were "unaware of immunity being lifted or of any arrest warrant" for him.
Later, the Brigade for the Fight against Crime, a police division made up of former rebels, claimed responsibility, the official LANA news agency.
The government said it suspected both groups of being behind the abduction.
The two groups fall under the control of the defence and interior ministries but largely operate autonomously.
Two years after the revolution that toppled Gaddafi, Libya's new authorities are still struggling to rein in tribal militias and groups of former rebels.
Many Libyans blame political rivalries for the problems plaguing a country awash with militias and weaponry left over from the 2011 NATO-backed rebellion.
Zeidan, who was named premier a year ago, had condemned the US capture of Libi and insisted that all Libyans should be tried on home soil.
The GNC has demanded that Washington "immediately" hand Libi back, claiming his capture was a flagrant violation of Libyan sovereignty.
Libi -- whose real name is Nazih Abdul Hamed al-Raghie -- was on the FBI's most wanted list with a $5 million (3.7 million euro) bounty on his head for his alleged role in the 1998 twin bombings of US embassies in East Africa.
US Secretary of State John Kerry denounced Zeidan's abduction as "thuggery," while UN chief Ban Ki-moon condemned it "in the strongest possible terms".
Britain, which along with France had led the creation of a NATO no-fly zone in Libya at the start of the uprising, had earlier condemned the kidnapping and called for Zeidan's "immediate release".
NATO Secretary General Anders Fogh Rasmussen welcomed Zeidan's release but said "the situation in the country is a matter of concern" and that the international community has the "responsibility to help Libyan authorities".
Public anger in Libya is growing as widespread violence -- including political assassinations -- proliferates, particularly in the east of the country.
A number of foreign missions have come under attack in Tripoli and in the eastern city of Benghazi, the cradle of the 2011 revolution.
On September 11, 2012, four Americans, including the ambassador, were killed when militants swarmed into the US consulate in Benghazi.