It was the third attempt this week to storm the razor-wire fences around the outpost, a police spokesman said.
But this time migrants failed to get through, he added.
Police said an unknown number of police and immigrants were injured.
The Spanish enclaves of Melilla and Ceuta hold a powerful attraction for poor migrants hoping to eventually start a new life in Europe.
The latest attempt came hours after Spain announced extraordinary
measures to deter the migrants who mostly come from west Africa.
Spain said Wednesday that it would invoke a 1992 agreement with Morocco allowing it to return sub-Saharan Africans who had succeeded in getting into its enclaves.
Under the agreement, Spain can ask Morocco to readmit the
migrants even though they are not Moroccan.
Deputy Prime Minister Maria Teresa Fernandez de la Vega said
some immigrants could be sent back to Morocco on Thursday.
Many migrants are from countries with which Spain does not have
a repatriation agreement so they cannot be sent home.
Instead they are often taken to mainland Spain and issued with
an expulsion order that cannot be enforced.
Some 500 African migrants charged the fences around Melilla
Wednesday, and many of the 65 who got through were injured.
Five died last week in a similar attempt at Ceuta.
News reports claimed all of them were shot but it was not clear by whom.
“You’re not afraid, because in Africa you have nothing … you
just keep thinking that you are entering Spain,” said Keta, a
24-year-old Malian who managed to cross the border on Wednesday.
His hands were covered in gashes and his jeans ripped and
spotted with blood from where he climbed over the border fence.
The Moroccan news agency MAP reported authorities in Nador, close to Melilla, arrested 85 sub-Saharan Africans, bringing the total arrested this week to more than 200.
Some 1,600 migrants are crammed into the Red Cross camp at
Melilla, which has space for 500.
Some immigrants try repeatedly to get over the border.
Hundreds of migrants live in the woods on the Moroccan side of
the 10km border, waiting to jump the fence.
The migrants build ladders from trees which they then use to
scale the double fences.
Spain has ruled Melilla and Ceuta since the late 15th century.