Spain on Friday issued an ultimatum to Italy's right-wing government to end border controls introduced in response to the migration crisis in the Spanish North African enclave of Ceuta.

"If it fails to do so by Sunday, August 9, Spain will be forced to take proportionate measures to protect the interests and dignity of its citizens," Spanish public broadcaster RTVE and other local media quoted a statement from the left-wing government as saying.

Madrid considers the controls "unfair, contrary to the interests of the EU, and discriminatory towards the Spanish population," it said.

Italian Prime Minister Giorgia Meloni made it clear she will not comply with any ultimatum, according to a statement from her office seen by dpa.

"Italy does not accept ultimatums or directives from abroad regarding national security and border checks," the statement said. "We do not intend under any circumstances to reverse the decision to suspend the application of the Schengen Agreement for third-country nationals from Spain, at least until August 15 and in any case until security and terrorism risks for Italy are fully ruled out."

Italy suspended the Schengen rules on free movement with Spain last Saturday in response to the migration crisis in Ceuta, where around 72,000 people temporarily crossed into the territory from neighbouring Morocco.

Meloni described the border checks as an "extraordinary measure" taken "to guarantee national security and prevent possible repercussions" for Italy.

Italy shares no land border with Spain, so the measure announced by Meloni applies to maritime and air travel. The checks focus primarily on travellers who are not EU citizens.

Migrants who have entered Ceuta have no way of flying or taking a ferry to the Spanish mainland and travelling on to Italy from there.