The closure is the latest disruption to hit the country's troubled economy in recent months, after militias seized a series of oil and gas terminals, severely cutting production and sapping much-needed state revenue.
The protesters blocked entrances to the offices of The Arabian Gulf Oil company, a branch of the state-owned National Oil Corporation, in the eastern port city of Tobruk, the official said.
They also blocked a road intersection leading to the refinery and forced the administration to halt production of fuel and natural gas destined for local consumption, he added. The official spoke on condition of anonymity because he was not authorised to speak to the press.
Local militias this past week split into two factions, one of which struck an agreement with the government to reopen the terminals within a week. But with another faction unsatisfied, it is unclear whether the ports will remained blocked.
More From This Section
Libya's heavily armed militias, many made up of former rebels who fought against former dictator Moammar Gadhafi, have proliferated since the 2011 civil war that ended with the dictator's ouster and death. Since then, they have undermined successive transitional governments and parliament.
With assassinations of public figures and security officials frequent, much of the lawlessness is blamed on the groups.
But the government also relies on many of them to provide security in the absence of a functioning police force. Since the militias began blocking oil production last summer, Libya's output has plummeted to only a few hundred thousand barrels per day, from a previous 1.4 billion barrels.