ATHENS, Greece — A major overnight fire swept through Greece’s largest refugee camp, which had been placed under COVID-19 lockdown, burning through container housing and leaving more than 12,000 migrants Wednesday in emergency need of shelter on the island of Lesbos.

In dramatic night-time scenes, migrants at the overcrowded Moria refugee camp fled fires that broke out at multiple points and were fanned by gale-force winds, gutting much of the camp and surrounding hillside olive groves. Protests also broke out involving migrants, riot police, and firefighters. There were no reports of injuries.

Aid agencies have long warned of dire living conditions at Moria, where more than 12,500 have been living in and around a facility built to house just over 2,750.

A state of emergency was declared on the island starting Wednesday for public health reasons and will be in effect for four months, Greece’s civil protection authority announced.

“It has been a very difficult night,” Greek government spokesman Stelios Petsas said, adding that all possible causes of the fire, including arson, were being examined.

Petsas said those who had been living in Moria would not be allowed to leave the island to prevent the potential spread of the coronavirus.

The camp was put under lockdown after a Somali man was found to have been infected with the virus. A major testing drive was ordered, and 35 people who tested positive had been quarantined in a separate facility that was not affected by the fire, officials said.

Greece’s interior and migration ministers, along with the head of the country’s public health organization, were heading to Lesbos following an emergency meeting convened Wednesday morning by Prime Minister Kyriakos Mitsotakis. The commander of Greece’s intelligence service, the civil protection head and the chief of defense general staff participated in the meeting.

European authorities, who have often come under criticism for not doing enough to ease the migration burden on countries at Europe’s southern borders such as Greece, Italy and Spain, were quick to offer assistance.

“What’s happening in Moria is a humanitarian catastrophe,” German Foreign Minister Heiko Maas tweeted. “In cooperation with the EU Commission and other EU member states willing to help we need to sort out as quickly as possible how we can support Greece. This includes the distribution of refugees among those in the EU that are willing to take them.”

The United Nations' refugee agency said it had deployed its staff on the ground and offered assistance to Greek authorities.

European Commission Vice President Margaritis Schinas, who is responsible for migration matters, tweeted that he had been in touch with Mitsotakis and “assured him that the European Commission is ready to assist Greece immediately at all levels at this difficult time.”

EU Home Affairs Commissioner Ylva Johansson said she had “already agreed to finance the immediate transfer and accommodation on the mainland of the remaining 400 unaccompanied children and teenagers” who had been living in the camp.

“The safety and shelter of all people in Moria is the priority,” Johansson tweeted.

The fires broke out overnight, police and fire officials on the island told The Associated Press, adding the cause of the blazes, as well as the full extent of the damage, remained unclear. They did not confirm local reports that the fires had been set deliberately in protest at the lockdown measures but said firefighters had “met resistance” from some camp residents.

Regional fire chief Konstantinos Theofilopoulos told state-run ERT television that the fire broke out at more than three places in quick succession, and that firefighters were hampered by protesting residents from battling the flames.

The main blaze was out by Wednesday morning, but the fire chief said some containers still had small slow-burning fires inside.

Before dawn, riot police set up cordons along a highway near the camp to restrict the movements of migrants.

Lesbos was Europe’s busiest crossing point in 2015-16 for illegal migration during a massive westward movement of refugees, many fleeing war in Syria and Iraq and traveling through Turkey.

After that wave of migration, Greece set up camps on Lesbos and four other islands, with help from European Union funding, and more recently also set up a network of camps on the mainland.

Migrant arrivals in Europe have declined consistently since their peak in 2015, when more than 1 million people entered irregularly, primarily from Turkey to Greece. According to the U.N. refugee agency about 50,000 migrants have arrived in southern Europe so far this year, including 20,000 in Italy, 15,000 in Spain and 12,000 in Greece.