Spain says 800 African migrants have tried to storm the border fences separating Spain's North African enclave of Melilla from Morocco in the second such attempt in two days.

The Interior Ministry said police repelled most but 54 migrants managed to make it across Wednesday. Spanish National Television showed the migrants celebrating the feat.

The ministry said two police officers were treated for unspecified injuries during the melee.

Thousands of African migrants living illegally in Morocco try to enter the Spanish enclaves of Melilla and Ceuta each year, hoping to reach a better life in Europe.

On Tuesday, 200 migrants stormed the six-meter (20-foot) high fences, with 102 getting across.