Warplanes from Libya's official government attacked a ship off the Libyan port of Sirte on Sunday, the air force commander said.
"Our jets warned an unflagged ship off Sirte city, but it ignored the warning," Saqer al-Joroushi told Reuters.
"We gave it a chance to evaluate the situation, then our fighting jets attacked the ship because it was unloading fighters and weapons," he added. An oil official said the ship was actually a tanker which had been carrying 25,000 tonnes of gas-oil.
One person died aboard a Turkish cargo ship after it came under fire from the Libyan coast as it approached Tobruk.
The ship was then attacked from the air as it tried to leave the area, the Turkish Foreign Ministry said.
The ship's third officer died and other crew members were wounded in the attacks on Sunday, which the ministry condemned in a statement, saying the ship was in international waters at the time.
The statement did not specify who launched the attacks.
Nearly 3,700 migrants were rescued from boats near the coast of Libya on Saturday and early Sunday, Italy's coast guard has said.
All of those rescued were being brought back to Italian shores, and some reached Lampedusa, Italy's southernmost island, during the night, a spokesman said.
Ed Miliband has dismissed claims his criticism of David Cameron over Libya was inappropriate.
As ITV News Political Correspondent Carl Dinnen reports, the Labour leader described as "nonsense" the accusation he was politicising a tragedy.
Ed Miliband; Tories are trying to whip up a storm, tells me their accusation that this is 'politicising a tragedy' is 'Nonsense' #GE2015
Abdel Rahim Ali says his journey from Africa to Europe was fraught with hunger, incarceration and the regular threat of death.Read the full story ›
Nigel Farage has blamed the Conservative, Labour and Liberal Democrat parties for the "tidal wave of people" trying to get to Europe, saying it was the downfall of Libyan leader Muammar Gaddafi which has lead to migrants dying as they try to flee to Europe.
The Ukip leader was talking to Lorraine Kelly about the recent drowning of hundreds of migrants in the Mediterranean. Up to 1,500 migrants have drowned on their way to Europe and more than 13,000 people have been rescued by the Italian Navy this year alone.
Around 400 migrants have died in a failed bid to escape Libya and sail to Italy, survivors said, as the death toll from shipwrecks in the Mediterranean soars.
The boat was carrying an estimated 550 people in total when it capsized 24 hours after leaving the Libyan coast, Save the Children reported.
The number adds to more than 500 migrants who have already died while making the journey from Africa so far this year - up from 47 in the same period last year - as people there flee government instability and violence.
More than 8,000 migrants have been rescued from the Mediterranean in the past week alone, as the spring weather makes passage slightly safer.
Save the Children and other humanitarian groups have called on the European Union to strengthen its sea rescue operations programme, as migrant flows are expected to rise further during the summer months.
A security official says a bomb exploded at the gate of the Moroccan embassy in the Libyan capital earlier. Nobody was wounded in the bomb attack, he said.
The gate and a residential building next to the embassy were damaged, residents said. Militants claiming loyalty to Islamic State said on twitter they were responsible for the attack.
Five people were killed in the central Libyan city of Sirte in an apparent suicide bombing on Wednesday, a security source said.
Tripoli-based al-Nabaa television said the five died near the city's power station.
Several foreigners, including a Czech and an Austrian, are missing after gunmen attacked the al-Ghani oilfield in Libya this week, according to the Czech Foreign Ministry.
In a statement the ministry said: "There was a Czech citizen present at the spot, who has been missing since.
"Together with him, an Austrian citizen is unaccounted for as well as several other persons from third countries."
The ministry said a crisis committee including Prime Minister Bohuslav Sobotka and secret services had met to discuss the situation, and a foreign ministry representative would be dispatched to the region as soon as possible.
Libya's oil security forces said on Friday they had retaken control of the oilfield after militants attacked the facility, killing seven guards.