The armed men had tried to take control of a vacant defence ministry building as well as the labour ministry and the ministry in charge of missing people.
Ashraf al-Thulthi said "outlaws" who back the former self-proclaimed "Government of National Salvation" of Khalifa Ghweil opposed to the GNA clashed with loyalist forces and were forced to retreat.
They had tried to take control of a vacant defence ministry building as well as the labour ministry and the ministry in charge of the affairs of martyrs and missing people, he added.
Ghweil has refused to recognise the authority of the GNA since it was formed at the end of March 2016 and since then continues to issue statements bearing the logo of his self-proclaimed administration.
On Thursday, the Ghweil administration said on its Facebook page that it had seized control of the three ministries.
But the streets of the Libyan capital appeared calm on Thursday, witnesses said, adding that there was nothing suspicious going on and no armed presence.
In October, Ghweil appeared on television and read a statement proclaiming that his administration would continue to operate and said he had taken over the offices of a key GNA consultative body.
The GNA is the centrepiece of Western hopes to stem an upsurge of jihadism in the North African nation and halt people trafficking across the Mediterranean that has led to thousands of drownings.
Led by prime minister designate Fayez al-Sarraj, it was intended to replace Ghweil's administration and a rival government in the country's far east, but that one too still refuses to recognise the GNA.