Around 700 migrants have tried to storm the border crossing between Spain's North African enclave of Ceuta and Morocco but none managed to make it across, Spanish officials said.
The migrants also tried to scale the 20ft barbed-wire fences around Ceuta after the early Thursday crossing attempt at the Tarajal post failed, but were again repelled by Moroccan and Spanish police, the interior ministry's office in Ceuta said.
Spain and Morocco on Wednesday agreed to close the Tarajal post to freight traffic for a week because of recent migrant crossing attempts.
Pedestrian and passenger vehicles were still allowed.
Every year, thousands of sub-Saharan African migrants living illegally in Morocco try to scale the border fences surrounding Ceuta and Melilla, Spain's other North African enclave, in a bid to enter Europe.