At least two men died and several were seriously injured when about 70 people tried to storm a fence dividing Spain's enclave of Melilla from Morocco.
Migrants often attempt to climb the border fences
It is thought that both fell from the top of a barrier six metres (yards) high, one landing on the Spanish side, the other on the Moroccan.
It was the first mass attempt to cross since October, when hundreds of people stormed barriers there and at Ceuta.
Separately, 18 illegal migrants bound for Spain drowned off Morocco.
Their flimsy boat sank off the Sahara Desert while en route to Spain's Canary Islands, Moroccan officials said.
Survivors said the number of dead could actually be much greater as the boat was carrying 37 people, all from sub-Saharan Africa.
Twelve people are still missing, Reuters news agency reports.