"The Civil Guard at Ceuta estimates that 500 people could have succeeded in entering the town," the emergency services said on Twitter.
The Civil Guard, or paramilitary police, meanwhile told AFP that "several hundreds" had crossed over and many of them were hurt along with members of the security forces.Footage shot by the local Faro de Ceuta television showed dozens of euphoric migrants wandering the streets of the seaside enclave, ecstatic to have finally crossed into a European Union state.
"I love you Mamma, long live Spain," shouted one young African draped in a blue EU flag. "Libertad, libertad" (freedom), shouted another.
Several had visible injuries.
Row over trade deal
The massive entry, one of the biggest since the border barrier was reinforced in 2005, comes amid a dispute between Morocco and the EU over the interpretation of a free trade farm and fishing deal.
In a late 2016 ruling, an EU court said the deal did not apply to the Western Sahara, a former Spanish colony controlled by Rabat where the Polisario Front is fighting for independence.
The court said this was because the status of the disputed territory remained unclear according to the international community. The 28-nation bloc did not recognize it as part of Morocco.
The ruling opened the way for the Polisario Front and its supporters to contest trade in products from the Western Sahara between Morocco and the 28 EU states.
The decision angered Morocco, which in a warning on February 7 suggested it could lead to "a new flow of migration" towards Europe and place the continent "at risk".
The last such massive attempt took place on New Year's Day when more than 1,000 migrants tried to jump a high double fence between Morocco and Ceuta in a violent assault that saw one officer lose an eye.
The enclave has been ringed by a double wire fence that is eight kilometres (five miles) long. The six-metre (20-foot) high fence also has rolls of barbed wire.