Another 21 people were wounded in the fighting on Sunday and Monday in Garabulli about 60 kilometres (40 miles) east of the capital, the ministry said overnight on Facebook.
Two foreign workers, whose nationalities were unclear, were among those killed, it said.
Clashes broke out on Sunday evening between forces loyal to the Government of National Accord and fighters aligned with former prime minister Khalifa Ghweil who refuses to recognise the UN-backed government in Tripoli, witnesses said.
The violence was continuing at dawn on Tuesday, they said.
Pro-GNA forces backed by dozens of tanks and pick-up trucks mounted with anti-aircraft guns deployed east of the capital heading for Garabulli on the weekend, the witnesses said.
On Friday the GNA warned groups it described as “outlaws” against attempting to advance on Tripoli, adding that it had instructed security forces to prevent an assault on the capital.
Libya has been wracked by chaos since the 2011 toppling of dictator Moamer Kadhafi, with various militias and administrations vying for control of the oil-rich country.
A rival authority based in the country’s east has refused to recognise the GNA since it started working in Tripoli in March last year.
Download our app and read this and other great stories on the move. Available for Android and iOS.