Libyan soldiers in charge of securing the prime minister's office blocked cars from leaving the building on Wednesday in protest at not having been paid, officials said.
A government spokesman declined to give more details or say whether Prime Minister Abdullah al-Thinni was in the building located in central Tripoli during the protest, Reuters reported.
He said the protesters were members of Battalion No 127, which is tasked with securing the prime minister's office.
A member of staff at the prime minister's office said protesters were demanding their salaries as they had not been paid for a while.
Libya's government struggles to impose authority and control militias who helped oust Muammar Gaddafi in 2011 but now seize ministries or oilfields at will to make political or financial demands.
Thinni resigned last month after he said gunmen had attacked his family. Last week, parliament chose Ahmed Maiteeq as his successor in a chaotic vote. Thinni will remain in office until Maiteeq is able to form a government.
Follow us on Twitter @TRENDNewsAgency