MADRID - About 2,000 migrants on Friday stormed a high fence that seals off Spain's North African enclave of Melilla, dozens of whom managed to cross from Morocco after a violent two-hour skirmish with border officers, Spanish authorities said.

Melilla and Ceuta, a second Spanish enclave also on Africa's northern coast, have over the past decade become a magnet for mostly sub-Saharan migrants trying to get into Europe.

Friday's attempt - which Spanish authorities said led to 57 migrants and 49 Spanish police sustaining injuries - began around 6:40 a.m. local time in the face of resistance from Moroccan security forces.

At around 8:40 a.m., more than 500 migrants began to enter Melilla, jumping over the roof of a border checkpoint after cutting through fencing with a bolt cutter, the Madrid government's representative body there said in a statement.

Most were forced back but around 130 men managed to reach the enclave and were being processed at its reception centre for immigrants, it added.

AMDH Nador, a Moroccan human rights watchdog, said the incursion came a day after migrants clashed with Moroccan security personnel attempting to clear camps they had set up in a forest near Melilla.

The watchdog's head, Omar Naji, told Reuters that clash was part of an "intense crackdown" on migrants since Spanish and Moroccan forces resumed joint patrols and reinforced security measures in the area around the enclave.

The Moroccan interior ministry official in charge of migration and border control was not immediately available for comment.

The incursion was the first significant one since mid-March, when Spain adopted a pro-Rabat stance over Western Sahara, a territory claimed by Morocco but where an Algeria-backed independence movement is demanding the establishment of a sovereign state.

In the weeks of 2022 prior to that shift, migrant entries into the two enclaves had more than trebled compared with the same period of 2021.

In mid-2021, as many as 8,000 people swam into Ceuta or clambered over its fence over a couple of days, taking advantage of the apparent lifting of a security net on the Moroccan side of the border following a bilateral diplomatic spat.

(Reporting by Emma Pinedo, Christina Thykjaer in Madrid and Ahmed El Jechtimi in Morocco, editing by Aislinn Laing and John Stonestreet)