The Spanish government demanded on Saturday that Israel comply with an order by the top UN court to immediately stop its bombardment and ground assault on the Gazan city of Rafah.
It stressed that the ruling on Friday by the International Court of Justice (ICJ) was legally binding.
"The precautionary measures set out by the ICJ, including that Israel should cease its military offensive in Rafah, are compulsory. Israel must comply with them," Foreign Minister Jose Manuel Albares wrote on X.
"The same goes for a ceasefire, the release of the hostages and access for humanitarian aid (to Gaza)," he said.
"The suffering of the people of Gaza and the violence must end."
In a case brought by South Africa alleging the Israeli assault on Gaza amounts to "genocide", the ICJ ordered Israel on Friday to "immediately halt" the ground and air offensive in Rafah.
The operations began on May 7 despite international fears for the safety of the 1.4 million civilians trapped in the city.
The Hague-based ICJ, whose orders are legally binding but lack direct enforcement mechanisms, also ruled that Israel must keep open the key Rafah crossing with Egypt to allow "unhindered" humanitarian aid into Gaza.
And it urged the "unconditional" release of hostages taken by Hamas fighters during their October 7 attack in Israel.
Israel responded on Saturday by bombing Rafah and other parts of the densely populated Gaza Strip.
Spain is one of the European countries to have been most critical of Israel over the war in Gaza.
On Wednesday, Spain, Ireland and Norway said their governments would recognise a Palestinian state from next week.
Israel summoned their envoys to "reprimand" them for the decision and on Friday said it would ban Spain's consulate in Jerusalem from helping Palestinians in the occupied West Bank.
The war in Gaza began after Hamas's unprecedented October 7 attack, which resulted in the deaths of more than 1,170 people, mostly civilians, according to an AFP tally based on Israeli official figures.
Some 252 people were taken hostage, 121 of whom remain in Gaza, including 37 the Israeli army says are dead.
Israel's retaliatory offensive has killed at least 35,857 people in Gaza, mostly women and children, according to data from the Hamas-run territory's health ministry.