Spain is urging regional authorities to take in hundreds of unaccompanied foreign minors after about 8,000 migrants crossed from Morocco into the small Spanish North African enclave of Ceuta.
The central government wants to distribute 200 children among the provinces to relieve the pressure on migrant reception centres.
The minors are drawn from the influx on Monday and Tuesday, when about 1,500 children reached Ceuta.
Spain’s government said the children could be transferred immediately. In doing so, the minors could be properly cared for, it said.
Moroccan border guards were accused of turning a blind eye to departures, although it has since strengthened its security in the area.
Spain's defence minister Margarita Robles hit out at Morocco and said her country would not accept being pressured with “the use of minors".
“We are not going to accept being blackmailed,” she told Spain's public radio. “Spain's integrity is not negotiable and is not at stake. We are going to use all necessary means to guarantee the territorial integrity and to keep vigilance on our frontiers.
“You don't play with Spain.”
Spain's social policy minister Ione Belarra said some of the unaccompanied migrants in Ceuta were as young as seven.
"We are working to address the issue of children who have come alone," she told the TVE broadcaster. "Many of them did not know the consequences of crossing the border. And many of them want to go back. So we are working to make that possible."
All the regional authorities are in support of the distribution idea. Andalusia, the southernmost community in mainland Spain, at first resisted the idea having often borne the brunt of previous migrant arrivals.
It has since announced it will take in 13 unaccompanied minors from Ceuta.
Overnight, there were reports of clashes between Moroccan police and young Moroccans in the town of Fnideq, which is close to the border with Ceuta.
The influx into Ceuta has since slowed, with at least 5,600 migrants being sent back to Morocco.
Tensions surged between Spain and Morocco, with the former's Prime Minister Pedro Sanchez blasting Rabat for its disrespect towards his country and the EU over the matter.
Morocco's minister of state for human rights, El Mustapha Ramid, suggested the lack of border controls was justified because Spain is treating a Western Sahara rebel leader wanted by Rabat.
"What did Spain expect from Morocco, which sees its neighbour hosting the head of a group that took up arms against the kingdom?" he said, referring to Polisario Front leader Brahim Ghali, who fled to Spain.