According to local police, at least 18 people were killed Friday night as a giant mob attempted to cross into the Spanish enclave of Melilla in northern Morocco.
The Spanish administration reported that more than 2,000 migrants had reached Melilla, with 500 crossing the border after cutting a fence.
Spain declined to comment on the number of fatalities and referred such inquiries to Morocco.
In addition to the five confirmed deaths earlier in the day, Moroccan officials said that 13 individuals had died of injuries inflicted during the raid late Friday.
According to the Moroccan interior ministry, the fatalities happened when individuals attempted to scale an iron barrier.
A Moroccan official stated that some migrants fell from the top of the barrier dividing the two sides and that 140 security personnel and 76 migrants were hurt during the effort to cross.
Images published by the Spanish media depicted weary individuals lying on the ground in Melilla, some with bloodied hands and tattered clothing.
Pedro Sanchez, the prime minister of Spain, hailed officers on both sides of the border for their response to the "well-organized violent assault," which he attributed to "human trafficking mafias."
Melilla and Ceuta, Spain's other little North African enclave, are the only land borders of the European Union in Africa, making them a target for Africans wanting to enter Europe.
Earlier on Thursday, human rights organizations reported that several individuals were hospitalized following "clashes" with local security officers on the Moroccan side of the border.
"Lethal immigration policies"
The Moroccan rights organization AMDH demanded an investigation "to determine the circumstances of this very heavy death toll," claiming that it proves that the "migration policies [being] followed are deadly with borders and barriers that kill."
This is the first instance of a crossing attempt since Spain and Morocco resolved their diplomatic dispute.
Last month, Madrid approved Rabat's autonomy plan for Western Sahara, changing a decades-long policy of neutrality. This marked the beginning of the rehabilitation between the two countries.
In April 2021, Morocco cut ties with Spain when Spanish authorities permitted Brahim Ghali, the commander of the pro-independence Polisario Front of Western Sahara, to be treated for Covid-19 in a Spanish hospital.
In the month following Ghali's admission to a Spanish hospital, 10,000 Moroccans illegally entered the Spanish enclave of Ceuta while border guards looked the other way.
Spain has noticed a decline in the number of persons attempting to illegally enter its borders, particularly in the Canary Islands in the Atlantic.
According to government data, the number of migrants that arrived in the Canary Islands in April 2022 was 70 percent lower than in February.