Several hundred migrants have stormed a six-metre (20 ft) security fence that separates Morocco from Ceuta, a Spanish territory in North Africa.
Police said security cameras showed around 600 migrants, some with shears and clubs, breaking through one of the gates.
More than 300 reportedly made it across the razor wire barrier.
Ceuta and Melilla, another Spanish territory in North Africa, have the EU's only land borders with Africa.
As a result, they are popular crossing points for migrants hoping to reach a new life in Europe.
The Red Cross is treating about 400 migrants at its centre in Ceuta and dispatched five ambulances to help, the local emergency service said on Twitter.
Spain's Civil Guard said three police officers had been taken to hospital.
- What are Ceuta and Melilla like?
- More on Europe's migrant crisis
"The Civil Guard at Ceuta estimates that 500 people could have succeeded in entering the town," the emergency services tweeted.
Many of those who tried to break through the fence were pushed back by Moroccan security forces.
Dozens who made it across celebrated in the streets in the early hours of the day, with some shouting "freedom", TV footage showed.Image copyright AP Image caption Some of those who made it over the fence were pictured celebrating Image copyright EPA Image caption A migrant were seen with bloodied hands from the razor wire fence
The methods often used by migrants to enter Ceuta include climbing the border fence, swimming along the coast, or hiding in vehicles.
But most migrants are intercepted and returned to Morocco, and those who do make it over the fences are eventually repatriated or released.
The last mass attempt to climb the fence happened on New Year's Day, and involved about 1,100 migrants.
Only two were successful, and both required hospital treatment. One guard lost an eye in the violence, officials said.