Melilla migrants
African migrants sit atop a border fence, as Spanish Civil Guard officers stand underneath, during an attempt to cross into Spanish territories, between Morocco and Spain's north African enclave of Melilla Reuters

Spanish authorities were facing criticism after a video showing security forces in the north-west African enclave city of Melilla beating an illegal migrant unconscious before handing him back to Moroccan authorities was posted online.

The incident happened earlier this week, as some 300 African asylum seekers attempted to cross into the Spanish territory, scaling the six-metre (20-foot) high, triple-layer fence separating it from Morocco.

Camera footage released by rights group Prodein shows Civil Guard officers as they try to force down a group of migrants perched on the fence.

As one of them nears a ladder provided by police and attempts to descend, he is repeatedly hit by policemen with batons. After a blow to the head, the man crashes to the ground unconscious.

Officers drag him to a nearby road and leave him lying there for a couple of minutes. A medical car and an ambulance drive past without stopping.

Still unconscious, the man, identified by Prodein only as Danny, a 23-year-old from Cameroon, is then hand-carried back to the Moroccan side of the fence, without receiving any medical attention.

"The Civil Guard has a duty to take injured immigrants to a hospital," Prodein chairman, José Palazón, told El Mundo newspaper.

"This guy got injured in Spain and might have had a concussion; therefore he was not to be moved.

"Instead they carried him as if it was a pig, an animal," he said, adding that friends of Danny said he was in a serious condition.

Before the footage emerged, the Spanish government said five police officers and five migrants were injured in clashes at the border fence.

The Interior Ministry accused the migrants of acting with "unusual violence", saying some were armed with knives, sticks and stones, while others set pieces of clothing on fire and hurled them at police.

Large groups of African immigrants living illegally in Morocco often try to cross into Spain's enclaves of Melilla and Ceuta in a bid to reach Europe.