Fire has destroyed Greece's largest migrant camp, the overcrowded Moria facility on the island of Lesbos.
About 25 firefighters with 10 engines battled the flames as migrants were evacuated. Some suffered injuries from smoke exposure.
Reports say migrants protesting against coronavirus rules may have started the fire, though this is unconfirmed.
Police cordoned off roads leading from the camp to prevent fleeing migrants entering nearby towns.
Moria is home to nearly 13,000 people, more than four times the number it can officially hold.
According to InfoMigrants, about 70% of people in the camp are from Afghanistan but migrants from more than 70 different countries live there.
Lesbos deputy governor Aris Hatzikomninos reportedly told local radio the camp had been "completely destroyed". Greek Prime Minister Kyriakos Mitsotakis called an emergency meeting on the fire on Wednesday morning, and several ministers are now heading to Lesbos to assess the situation.
The EU has offered to help with the response. European Commission Vice-President Margaritis Schinas said he had spoken to Mr Mitsotakis and that the commission was "ready to assist Greece directly at all levels during these difficult times".
EU home affairs commissioner Ylva Johansson meanwhile said she had agreed to finance the transfer of 400 unaccompanied teenagers and children to the mainland and their accommodation.
"The safety and shelter of all people in Moria is a priority," she tweeted.
Fire broke out in more than three places in a short space of time, local fire chief Konstantinos Theofilopoulos told state television channel ERT.
Protesting migrants hindered firefighters who tried to tackle the flames, he said.
The main blaze was put out by Wednesday morning, although Mr Theofilopoulos said there were still some small fires burning inside some containers at the site.
One local resident told the BBC almost the whole camp had been on fire.
"Now with the first light I can see that there is a few tents that make it, they are okay, but the rest of the camp, as I can see from this distance, is burnt out," Thanasis Voulgarakis said.
The camp was placed under quarantine last week after a Somali migrant tested positive for the coronavirus. There are now 35 confirmed cases.
It is unclear how exactly the fires started. Greek news agency ANA said the fires had broken out after some of the 35 had refused to move into isolation with their families but this is unconfirmed. There are wildfires burning elsewhere on Lesbos, fanned by strong winds in the region.
Marco Sandrone, Lesbos project co-ordinator for Médecins Sans Frontières (MSF), told BBC World Service it was difficult to say what had caused the blaze, with several different fires and protests erupting in the camp.
"It's a time bomb that finally exploded," he said, adding that people had been kept in "inhumane conditions" at the site for years.
A government spokesman said reports of arson were under investigation and a state of emergency would be declared across the island.
Migrants with their belongings were blocked from entering the port town of Mytilene. Reports suggest many slept in fields after the fire.
"It is a very difficult situation because some of those who are outside will include people who are positive [for coronavirus]," the town's mayor reportedly told local radio.
The refugee support group Stand by Me Lesvos said it had heard reports of some locals attacking and preventing migrants from passing through a nearby village.
"The disaster at Moria is total," Greek migration ministry secretary Manos Logothetis told ANA news agency, and announced he was heading to the site.
The Moria Refugee Camp lies north-east of Mytilene, the capital of Lesbos.
It was built for just 2,000 people but has been overwhelmed by huge numbers of refugees. An overflow site - the Kara Tepe Refugee Camp - has since been built but there is still not enough space to accommodate all arrivals.
For years, thousands of people who arrived on Lesbos were placed in the camp and could not leave until their asylum application was processed on the mainland - a slow, bureaucratic process.
The EU has tried to resettle migrants among different member states. But governments across the bloc have rejected different proposals, and migrants have waited in squalid conditions.
Human rights groups have repeatedly attacked the poor conditions at the site.
In April, Human Rights Watch said the Greek authorities had not done enough to tackle "acute overcrowding" at the site, warning it was not prepared for an outbreak of coronavirus.
The Greek government plan to build closed detention sites to house migrants on the Greek islands. Protesters on Lesbos attacked authorities in February who brought construction equipment to the island.
Source: BBC