ATHENS, Greece (AP) — More than 20 migrants or refugees were rescued and one child died Thursday on a Greek island after the boat they set sail in overnight from the nearby Turkish coast either capsized or sank, Greek authorities said.

A vessel from the European border agency Frontex patrolling the area initially picked up six people — one man, two women and three children — it spotted in the sea off the small southeastern island of Kastellorizo in the early hours of Thursday, the Greek coast guard said. The six were transported to land immediately because one of the children, a 9-year-old girl, needed medical attention, but she later died, the coast guard said. Another four of the survivors were hospitalized.

Greek authorities launched a search operation with patrol boats and a helicopter, and crews later found and rescued another 20 people — five children, two women and 13 men — who had managed to swim to a rocky coast on the island. One of the group was also hospitalized.

It was unclear what type of vessel the migrants had used and whether it sank or capsized. The coast guard said all on board had been accounted for and there were no missing people reported. Those injured were being transported to a hospital on the island of Rhodes.

Greece was the preferred route for refugees and migrants fleeing war and poverty in their homelands to seek access into the European Union until last year, when an EU-Turkey deal drastically reduced the number of people heading to Greek islands from the Turkish coast.

Despite the deal and the overcrowded conditions in the camps on the Greek islands, hundreds still make the journey every week, using often unseaworthy and overcrowded inflatable dinghies or small wooden boats.