Conflicting reports surround the whereabouts of Moussa Ibrahim, who served as the last spokesman for deposed Libyan leader Muammar Gaddafi.
The prime minister's office had reported the arrest of Ibrahim just outside of Bani Walid, in a town southwest of the capital Tripoli.
But a government spokesman has since denied that Ibrahim is being held in custody.
Mustafa Abu Shagur, Libya's deputy prime minister, on Saturday posted the following on microblogging site Twitter: "Criminal Moussa Ibrahim was arrested and he is now on his way to Tripoli."
Live Box 201142012730683527
A brief statement sent to journalists after rumours that Ibrahim had been detained spread on social networking sites said: "Moussa Ibrahim was arrested at a checkpoint in the town of Tarhuna.
"[He] is being taken to Tripoli where he will be handed over to the pertinent authorities to begin questioning."
Al Jazeera's Omar al-Saleh, reporting from Tripoli, said that the town of Bani Walid has been the scene of deadly clashes in recent days.
"The town of Bani Walid has been besieged for the last three weeks. Government forces and former rebels are trying to enter the city to capture wanted Gaddafi loyalists," he said.
"The town has a reputation of being a safe haven for Gaddafi loyalists."
At least 26 people have been killed and many others injured in the fighting, according to reports.
Rumours of Ibrahim's arrest and that of other personalities of the former regime said to be fleeing from Bani Walid had swirled since Saturday morning but officials were unable to provide immediate confirmation.
There are also reports that the former leader's youngest son Khamis Gaddafi has been captured or killed in the fighting in Bani Walid.
'State of tension'
The report of Ibrahim's arrest came just hours after Libya's de facto head of state said that not all areas of the country had been liberated.
"The campaign to liberate the country has not been fully completed," Mohamed al-Magarief said on state television on Saturday in remarks on the first anniversary of Gaddafi's death.
He singled out Bani Walid, which was one of the final strongholds of Gaddafi's regime during the war that overthrew and killed him.
Rebel fighters captured Gaddafi in his hometown, Sirte, but exactly how Gaddafi was killed on October 20, 2011, remains a point of contention.
"Bani Walid's misfortune is that it has become a sanctuary for a large number of outlaws and anti-revolutionaries and mercenaries," Magarief said.
Magarief, the president of the democratically elected General National Congress, also noted "delays and negligence" in the formation of a professional army and police force, and the failure to disarm and integrate former rebels.
He also said delays in reactivating and reforming the judiciary had hampered national reconciliation.
"This situation has created a state of discontent and tension among different segments of society and contributed to the spread of chaos, disorder, corruption and weakness in the performance of various government agencies," he said.
Source: Al Jazeera And Agencies