Turkey opened fire on a migrant ship carrying over 300 men, women and children fleeing Syria, coast guard officials have confirmed.

Officials detained 337 Syrian refugees who were discovered on a 59 metre-long cargo ship off Turkey's western coast. Eighty-five of the refugees on board were children.

Governor Ahmet Cinar of Canakkale province said the Coast Guard fired on the freighter's engine room off the Gallipoli peninsula late Thursday, after it ignored warnings to stop.

Desperate migrants on board shouted "either to Italy or death" before the ship was halted, according to the Dogan news agency.

The vessel's final destination remains unclear.

The refugees are being held at a sports hall in Canakkale. Two members of the ship’s crew and a man suspected of trafficking the refugees have also been detained, according to the Hurriyet Daily News.

Four years of conflict in Syria has created a humanitarian disaster on an unprecedented scale. Eleven million people have been displaced by the crisis, with two thirds now living in neighbouring countries including Turkey.