Around 700 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 the migrants breaking through one of the gates, some wielding shears and clubs.
The Ceuta regional government said almost 500 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.
Ceuta is separated from the rest of Spain by the Strait of Gibraltar.
A Ceuta government official told The Associated Press that 498 migrants had forced their way into Spanish territory.
He said two were hospitalised due to injuries sustained in the assault, and that 11 Spanish police were also hurt.
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, shouting “freedom” and draping themselves in European flags.
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.
A note on terminology: The BBC uses the term migrant to refer to all people on the move who have yet to complete the legal process of claiming asylum. This group includes people fleeing war-torn countries such as Syria, who are likely to be granted refugee status, as well as people who are seeking jobs and better lives, who governments are likely to rule are economic migrants.
Hundreds of migrants storm fence to reach Spanish enclave of Ceuta