Warplanes sent from Libya's official government attacked a ship near the port of Sirte on Sunday, Reuters reported, injuring two people.
Air force Cmdr. Saqer al-Joroushi said the aircrafts warned the ship before striking, but the ship continued to unload. An oil official said the ship had actually been a tanker, named as Anwar Afriqya, unloading 25,000 tonnes of gasoil.
"Our jets warned an unflagged ship off Sirte city, but it ignored the warning," Joroushi said. "We gave it a chance to evaluate the situation, then our fighting jets attacked the ship because it was unloading fighters and weapons.
"The ship now is on fire. We are in war and we do not accept any security breaches, whether by land, air or sea," he added.
Rida Essa, commander of coastal guards for central Libya, said the tanker had been unloading gasoil for Sirte's power plant when the warplanes attacked. A crew member and port worker were wounded.
Sirte's power plant, on the western outskirts of the city, is controlled by the Tripoli-based government while the eastern part of the country is controlled by the internationally recognied government. Daesh (ISIS) militants have taken over most of Sirte.
Libya's two rival governments have been competing for power over the country since 2011, when former president Muammar Gaddafi was ousted.