Almost 500 migrants broke through the border of Spain's Ceuta enclave from Morocco on Friday.

A group of 700 people simultaneously rushed a gate in the 6-meter (20-foot) fence, with 498 making it into Spanish territory, the Spanish Civil Guard said. The mass entry was one of the largest since the fence was erected in 2005. Over 1,000 people stormed the border fence in January. For many, an attempt to reach a Spanish territory is safer than trying to cross the Mediterranean Sea, a route to Europe that saw a record number of deaths in 2016.

A Ceuta government official told The Associated Press two migrants were hospitalized due to injuries they sustained in the assault and 11 Spanish police were also hurt. A Civil Guard spokesman said at least 10 members of Morocco's armed forces were also injured.

Ceuta's Red Cross emergency response team reported more than 30 migrants were treated at a migrant center for bone fractures and other injuries.

Migrants are often injured in attempts on the border

A video filmed by "Faro TV Ceuta" showed migrants with blood on their faces and bruises but celebrating the arrival in Spanish territory. Some wrapped themselves in Spanish and European flags and screamed, "Freedom, freedom!"

Hundreds of people, mainly sub-Saharan Africans, live illegally in Morocco and regularly attempt to enter the Spanish enclaves of Ceuta and Melilla. Most are fleeing conflict and poverty.

The Spanish territories of Ceuta and Melilla have the European Union's only land borders with Africa.

Morocco threatens more migrants

In January about 1,100 people stormed the border fence, injuring at least 50 Moroccan and Spanish border guards. In December more than 400 migrants managed to enter the tiny territory of Ceuta when a group of more than 900 attempted to cross. And in October more than 200 people made it over the razor wire fence.

The latest attempt on the border came amid a tense trade dispute between Morocco and the EU over the interpretation of a free trade farm and fishing deal.

In late 2016, an EU court ruled the trade deal did not apply to the Western Sahara, a former Spanish colony controlled by Rabat where the Polisario Front is fighting for independence.

The court said control of the disputed territory remained unclear and the EU did not recognize it as part of Morocco.

The decision angered Morocco, which in a warning on February 7 suggested it could lead to "a new flow of migration" towards Europe and place the continent "at risk."

The border consists of two fences, eight kilometers long and six meters high. Between these a network of steel cables hinders movement.

aw/sms (AFP, AP, dpa, EFE)