Tahsin Kurtbeyoglu, governor of the coastal district of Menderes in Turkey's Izmir province, said 31 of the dead were children, including three babies. He said most of the migrants were Palestinians.
The migrants drowned when a boat carrying people seeking refuge in Europe sank after hitting rocks off the coast of west Turkey.
Dozens of survivors, mostly from Iraq and Syria, were able to swim through the Aegean waters to shore, only 50m away.
The survivors said several people had been trapped below the deck of the submerged vessel, and divers launched an operation to try to find them, though the death toll was expected to rise. Many on board were women and children.
The group had previously made their way to hotels in the city of Izmir, where smugglers agreed to take them to Britain. Authorities arrested two Turkish suspects in the smuggling operation, Turkey's TRT TV reported.
TRT earlier quoted Tahsin Kurtbeyoglu, a local administrator, as saying 20 bodies were recovered, but officials later raised the toll to 39. Those who survived – a total of 51, according to initial reports – were on the deck, rather than below with other members of their group. It was not immediately clear when the boat sank, but many such vessels carrying illegal immigrants make the journey at night to avoid detection by authorities.
Television footage showed several rescue vessels near the dim outline of the submerged boat, which lay just below the surface of the water. Ambulances waited at the top of a cliff, but there were no indications that anyone else had survived.
Illegal immigrants from Asia and Africa have long sought to reach Europe by passing through Turkey, and their desperate efforts have occasionally ended in disaster. Each year, thousands try to sail to Greek islands from Turkish soil in rickety boats.
Turkey is now hosting 80 000 Syrians who have fled the civil war in their country, with most staying in camps near the border. Some countries are concerned that larger numbers of Syrians could try to reach Europe illegally; Greece said in July that it was quadrupling the number of guards at its border with Turkey and boosting other defense in part because of worries about a potential influx. – Sapa-AP, Reuters