Libya's oil terminals at Tobruk and Zueitina re-opened over the weekend after protests forced both ports to shut, Libya's deputy oil minister Omar Shakmak said.
However, fresh trouble arose at Libya's gas-exporting Mellitah complex, he added, where guards were again attacked overnight after clashes in March forced a halt in flows.
This time operations had not been affected, Shakmak said, in the brief assault in which the attackers seized vehicles and weapons from the guards.
Mellitah is a joint venture between Libya's National Oil Corporation (NOC) and Italian oil and gas giant Eni.
"There were no firefights and the militias left the area. Activities there are proceeding as normal," an Eni spokesman said.
The terminal at Zueitina re-opened over the weekend after an agreement was reached with protesters, Shakmak said.
The port was shut for about six weeks at the start of the year by local people demanding jobs.
This was promised in February allowing normal work at the port to resume, but many had still not been hired due to administrative delays and had resumed protesting, Shakmak said.
The deputy oil minister said he sympathised with their demands, but added their actions were harmful to the country and it was unfortunate an agreement had been reached under duress.
"The people in the area say... over 40 years the company has made no contribution at all in the area," said Shakmak, adding the Zueitina valley had been badly neglected and infrastructure there was very poor.
"If you compare the cost of shutting down the terminal and production losses, versus hiring 200 or 300 employees, I think most people would go for the option of employment."
Zueitina is a relatively small producer, pumping between 60,000-70,000 barrels of oil and condensate - a light form of crude - per day. The firm's terminal however has the capacity to handle about 20 percent of Libya's crude exports.
Talks had similarly resolved problems at Tobruk over the weekend, which was closed by protesters for about a week, Shakmak said.
--Reporting by Jessica Donati and Ghaith Shennib; editing by James Jukwey (C) Reuters 2013.