Five African migrants died as hundreds stormed razor-wire fences between Morocco and a Spanish enclave on Thursday, officials said. The chaos led the government in Madrid to order an investigation into the deaths and send 480 additional soldiers to help control Europe's only borders with Africa.

As many as 600 Africans equipped with makeshift ladders staged a nighttime assault on two fences surrounding the outpost of Ceuta, which is near the Strait of Gibraltar on the North African coast.

"Bullets have been fired into the migrants storming the fence to force their way onto Spain," said Jemmah Khali, chairman of the Friends and Families of Illegal Immigration Victims Association.

He said he did not know who did the shooting. The border is protected by Spanish and Moroccan security forces.

Maria Teresa Fernandez de la Vega, Spain's deputy prime minister, said at a Spanish-Moroccan summit in the city of Seville that five immigrants died, two on the Spanish side and three in Morocco. She declined to comment on allegations that they had been shot.

Migrants from Africa have long tried to use Ceuta and a neighboring Spanish enclave, Melilla, as gateways to a better life in the wealthy European Union.

More than 1,000 migrants tried to scramble over the fence into Melilla earlier this week. Civil guards in riot gear repelled most of them, but about 300 got through. It was unclear how many migrants succeeded in entering Ceuta on Thursday.

The assaults were by far the biggest to date at the enclaves, which Spain has owned since the 16th century.

Under a bilateral agreement, Spain can repatriate illegal immigrants from Morocco, but it lacks similar agreements with many African countries. After handing migrants from those countries an expulsion order that authorities cannot enforce, Spain often has no choice but to free them.

Migrants wait for food at a holding facility in Melilla, a Spanish enclave in North Africa where 1,000 tried to enter from Morocco. Hundreds more tried to enter yesterday at nearby Ceuta.