At least five people have been killed during a mass attempt by migrants to get into the Spanish enclave of Ceuta in North Africa.
Many migrants see Spain as "the promised land"
"Three died on the Moroccan side of the border and two on the Spanish side," said Spanish deputy prime minister Maria Teresa Fernandez de la Vega.
Officials in Ceuta said the migrants were crushed to death as hundreds tried to cross the border fence from Morocco.
Spanish officials have denied reports that police opened fire on the crowd.
Earlier this week hundreds of migrants crossed into nearby Melilla - another Spanish enclave seen as a way into Europe by the mostly African migrants.
More than 40 people, including policemen, have been injured in recent mass attempts to break through. Three would-be immigrants have died since August.
CROSSING MELILLA'S FENCES
Many migrants are caught and many drown while attempting to make the sea crossing to enter Spain illegally.
At least 28 would-be immigrants were being treated in hospital for injuries, the regional government said.
CEUTA AND MELILLA
Under Spanish rule since 15th Century; claimed by Morocco
3m (10ft) border fences being increased to 6m (20ft)
Linked to Spain by air and ferry services
Fence length: 9.7km (6 miles)
Fence length: 8.2km (5 miles)
Immigrants try to enter by scaling cliffs north of town, by swimming to beach south of town, or by crossing fence
News of the deaths came as the Spanish and Moroccan prime ministers held a summit in Seville on the issue of illegal immigration.
Morocco and Spain are geographically so close that Africans pour into Morocco from all over the continent in an attempt to enter the European Union.
EU justice and home affairs commissioner Franco Frattini said on Thursday: "This tragedy, once again, bears witness to the urgent need for a genuine and effective management of migration issues."
The two countries have engaged in joint efforts to stem the flow of immigrants, with Spain deciding to raise the height of fences in Ceuta and Melilla and post more soldiers there, and Morocco putting a tighter watch on its coastline.
Over the last few weeks would-be immigrants have been using ladders and what Spanish officials have described as "military tactics" in their increasingly desperate attempts to get over border barriers, says a BBC correspondent.
Moroccan authorities are resentful at having to patrol the borders of Ceuta and Melilla - over which they claim sovereignty - and there are suspicions in Spain that the timing of this recent rush of illegal immigrants is no coincidence, the BBC's Katya Adler in Madrid says.