At least five migrants have died as hundreds of people rushed to the border fence between Morocco and the Spanish North African exclave of Melilla.

In addition, more than 200 people were injured when security forces tried to stop the migrants, the Moroccan Interior Ministry said on Friday.

According to media reports, hundreds of migrants climbed the border fence in northern Morocco.

The Europa Press news agency reported that they had broken open one of the gates in the border facility, citing the police.

According to the Interior Ministry, the five people died in the crowd or by falling from the fence.

140 security forces and 76 migrants were injured, it said.

The Interior Ministry accused the migrants of using violence.

They come from sub-Saharan Africa.

Video images on the Internet showed how mostly young men ran through the streets, beaming with joy, singing and dancing.

Some were injured when they stormed the border facility, which consists of two parallel barbed wire fences six meters high.

According to Spanish media reports, 116 Moroccan officials were injured the day before when they tried to keep around 500 migrants away from the border facility.

A police officer had to be treated in the intensive care unit of a hospital.

Morocco became independent from France and Spain in 1956.

Nevertheless, Spain continues to hold two exclaves there: Melilla and Ceuta, 250 kilometers further west on the Strait of Gibraltar.

Both are claimed by Rabat.

In the vicinity of the two areas, often tens of thousands of Africans, mainly from sub-Saharan countries, are waiting for a chance to enter the EU.

Usually several hundred people try to surprise the border officials and get across the border.

Illegal immigration to be discussed at NATO summit

The Spanish government made a diplomatic change of course in March after a long dispute over Morocco's Western Sahara policy.

Madrid recognized the Moroccan autonomy plan for the disputed area, which envisages, among other things, offering Western Sahara autonomy under Moroccan sovereignty.

Since then, ferry connections between Spain and Morocco have been resumed and police cooperation programs have been launched in the Spanish exclaves, among other places.

Spanish Prime Minister Pedro Sánchez recently warned that Madrid will not "tolerate the tragedy of illegal immigration as a bargaining chip".

Illegal immigration should be listed at the NATO summit at the end of June as a security threat on the alliance's southern flank.

In recent years, thousands of migrants have attempted to cross the 12 km Melilla-Morocco border or the 8 km Ceuta-Morocco border by climbing fences, swimming or hiding in cars.

The migrants sometimes use hooks and sticks to climb the border fence.