The charge on the six-metre (20-foot) fence late Thursday was the latest in a series of attempts by migrants desperate to reach European soil via Melilla, a Spanish enclave bordering Morocco on the Mediterranean coast.
The local Spanish government delegation said in a statement that between 150 and 200 migrants used ladders to scale the fence and about 70 succeeded in entering Melilla.
Medics treated six immigrants and a policeman for light injuries as well as two civil guards who were bitten, it said.
A local opposition politician, Mustafa Aberchan, said he saw police using violence against migrants and sheltered around 30 of them in his garage.
The head of the government delegation Abdelmalik El Barkani defended the police in the statement, saying they were there "to ensure the defence of our borders".
Hundreds of African migrants have tried to enter the territory over recent months by storming the fence or approaching by boat, according to Spanish authorities.
On April 21st, six Spanish police officers were injured when they tried to stop 15 migrants armed with sticks and knives from illegally entering Melilla by boat.
On March 11th, some 25 people were injured in a storming of the fence. A Moroccan human rights group said that one of them, a Cameroonian man of 30, died of his injuries in Morocco.
Melilla, home to around 80,000 people, has one of the European Union's two land borders with Africa, along with the other Spanish enclave of Ceuta to the west.
Spanish authorities have reported a surge in attempts to scale the fence over recent months while hundreds camp in the wild nearby on the Moroccan side.
Medical aid group Doctors Without Borders has announced it is closing its projects in Morocco in protest at the treatment of migrants who are brought to Morocco by traffickers and allegedly abused by Spanish and Moroccan police.
El Barkani described the flood of desperate migrants as a "tremendous human tragedy" and said he would reinforce policing at the border.