The Turkish government said in a statement on Monday that the ship was attacked while delivering a cargo of plasterboard to Tobruk from Spain. But a spokesman for the military forces allied with the Tobruk and Bayda government said on Monday that the Turkish vessel was bound for Darnah, a stronghold of Islamist forces.

“We have warned before about approaching Darnah port,” the spokesman, Mohamed Hejazi, told Reuters. The government said in January that the Greek tanker it bombed had also headed for Darnah, about 90 miles west of Tobruk. At least two crew members were killed.

The Turkish ship may also have been a target because the Tobruk-Bayda government accuses Ankara of fueling a proxy war playing out across Libya after the overthrow of Col. Muammar el-Qaddafi.

The faction that controls the Tobruk and Bayda government is allied with the military leader Khalifa Hifter and has the backing of Egypt and the United Arab Emirates, in what they characterize as a fight against Islamist extremists.

Its main rival, the faction based in Misurata and Tripoli, includes both moderate and extremist Islamists and has the backing of Qatar and Turkey in what they characterize as a fight against a return to autocracy. Western diplomats have said, though, that unlike the other three regional players, Turkey does not appear to be providing any military aid to its Libyan allies.