Ceuta officials said 498 migrants were counted climbing over the high border fence into the Spanish North African territory. A total 700 had attempted to cross, they said.
Moroccan authorities said 250 people tried to get across, of whom 110 were detained and around 20 injured.
In Ceuta, officials said two migrants and 11 officers were hurt.
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, while another shouted "Freedom, freedom!"
Ceuta and Melilla, also a Spanish territory in North Africa, have the EU's only land borders with Africa, so are entry points for migrants who either climb the border fence, swim along the coast or hide in vehicles.
Emergency services said on Twitter that 400 people were receiving assistance from the Spanish Red Cross.
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 recognise 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 1000 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 long. The six-metre high fence also has rolls of barbed wire.