Warplanes belonging to Libya¡¯s internationally recognized government bombed a gasoil tanker at a port controlled by the North African nation¡¯s rival Islamist leaders, the regional coast guard commander said.

The Anwaar Afriqya, a tanker carrying 30,000 metric tons of gasoil from Motor Oil Hellas¡¯s refinery in Greece, was attacked while anchored off Sirte in central Libya, Rida Issa, the coast guard chief, said by phone. The airstrike caused a fire on the tanker that was later extinguished, the vessel¡¯s second-in-command, Fakhri Mohammed, said.

¡°We succeeded in avoiding an environmental catastrophe,¡± Mohammed said by phone Monday.

Libya, holder of Africa¡¯s largest oil reserves, has been split since a coalition of Islamist militias captured Tripoli last year and forced the elected government to flee the capital city in the country¡¯s west and relocate to the eastern region. Each of the two governments supports a rival management of the state-owned National Oil Corp., or NOC.

The conflict in Libya has damaged or shut oil fields, pipelines and ports, reducing the nation¡¯s crude output to about 400,000 barrels a day, Mohamed Elharari, spokesman for NOC¡¯s Tripoli-based management said May 18. Libya pumped almost 1.6 million barrels before the 2011 rebellion that ended Moammar Gadhafi¡¯s 42-year rule.

The attack on the Anwaar Afriqya killed one person and wounded another, Issa said Sunday. The ship¡¯s cargo was meant to supply the electricity station in Sirte, he said.

NOC¡¯s Tripoli-based management condemned the attack, saying the tanker had the permission to carry the fuel to the city. ¡°This incident will have serious consequences on the national economy and the livelihood of all Libyan people,¡± the Islamist-backed management said on its website. ¡°It will make it more difficult to find tankers willing to operate in Libyan waters.¡±

The ship was struck by planes belonging to Gen. Khalifa Haftar, the head of the armed forces of the internationally recognized administration, according to Issa. ¡°They apparently believed that the tanker was carrying fighters¡± loyal to the rival government in Tripoli, he said.

The Libya-flagged ship is registered to owners Libyan Product Carrier Ltd., according to data compiled by Bloomberg. The double-hull ship reached Sirte on May 22 after sailing from Agio Theodhoroi in Greece, the data show.

The Islamist-backed government in Tripoli controls part of Sirte, including the outskirts where the power station is located. The rest of the city was taken over by a local militia loyal to Islamic State, the group that declared a caliphate over parts of Syria and Iraq.