Government Spokesman Mohammed Kaabar told the agency, LANA, that Zidan has been "set free" and was on his way to his office on Thursday.
Earlier Libyan Prime Minister Ali Zidan was snatched by gunmen before dawn from a Tripoli hotel where he resides, the government said. The abduction appeared to be in retaliation for the U.S. special forces' raid over the weekend that seized a Libyan al-Qaida suspect from the streets of the capital.
Zidan's abduction reflected the weakness of Libya's government, which is virtually held hostage by powerful militias, many of which are made up of Islamic militants. Militants were angered by the U.S. capture of the suspected militant, known as Abu Anas al-Libi, and accused the government of allowing the raid to happen or even colluding in it.
Witnesses told The Associated Press that up to 150 gunmen drove up in pickup trucks and laid siege to the Corinthia Hotel before daylight Thursday. A large group of them entered the building, some stayed in the lobby while others headed to the 21st floor where Zidan was staying.
The gunmen scuffled with the prime minister's guards before they seized him and led him out at around 5.15 a.m., said the witnesses, speaking on condition of anonymity because they feared for their own safety. They said Zidan offered no resistance while he was being led away.
In a sign of Libya's chaos, Zidan's seizure was depicted by various sources as either an "arrest" or an abduction - reflecting how interwoven militias are in Libya's fragmented power structure.
Mohammed Shaaban, Corinthia's security manager, said the gunmen showed the hotel's management an arrest warrant they claimed had been issued by the public prosecutor.
The public prosecutor's office said it had issued no warrant for Zidan's arrest.
With the country's police and army in disarray, many militiamen are enlisted to serve in state security agencies, though their loyalty is more to their own commanders than to government officials and they have often intimidated or threatened officials. The militias are rooted in the brigades that fought in the uprising that toppled the late dictator Moammar Gadhafi in 2011, and are often referred to as "revolutionaries."
A statement on the government's official website said Zidan was taken to an "unknown location for unknown reasons" by a group believed to be "revolutionaries" from a security agency known as the Anti-Crime Committee. The Cabinet held an emergency meeting Thursday morning, headed by Zidan's deputy, Abdel-Salam al-Qadi.
Meanwhile, Abdel-Moneim al-Hour, an official with the Anti-Crime Committee, told the AP that Zidan had been "arrested" on accusations of harming state security and corruption.
A government official said gunmen broke into the luxury hotel in downtown Tripoli where Zidan lives and abducted him and two of his guards. The two guards were beaten but later released. The official spoke to the AP on condition of anonymity for fear of retaliation.
A grainy photograph widely posted Thursday on social networking sites purportedly shows Zidan being led from the Tripoli hotel by two young men, one of them bearded, holding him from both arms. The prime minister is frowning and looking disheveled. The photo also shows the arm of a third man resting on Zidan's left shoulder.
Hours after the abduction, the streets of Tripoli appeared normal, with the bustle of the morning rush hour traffic. Children went to school as usual and stores opened.
State Department spokeswoman Jen Psaki, traveling with Secretary of State John Kerry in Brunei, said Washington was "looking into these reports and we are in close touch with senior U.S. and Libyan officials on the ground."
The snatching of Zidan came hours after he met with the family of al-Libi, whose real name is Nazih Abdul-Hamed al-Ruqai - the al-Qaida suspect seized by the Americans in a bold raid in Tripoli on Saturday morning. U.S. officials said al-Libi was immediately taken out of the country and is now being held on a U.S. warship.
On Tuesday, Zidan said the Libyan government had requested that Washington allow al-Libi's family to establish contact with him. Zidan insisted that Libyan citizens should be tried in their homeland if they are accused of crimes, stressing that "Libya does not surrender its sons."
Al-Libi is alleged to be a senior al-Qaida member and is wanted by the United States in connection to the bombing of American embassies in Tanzania and Kenya in 1998, with a $5 million bounty on his head.
Immediately after the raid, the Libyan government issued a statement saying it was carried out without its knowledge and asking Washington for "clarifications" about the operation.
"The U.S. was very helpful to Libya during the revolution and the relations should not be affected by an incident, even if it is a serious one," Zidan said at a press conference in Tripoli.
Michael reported from Cairo.