Spain said on Thursday that it will join South Africa's case at the UN's top court in which Pretoria has accused Israel of "genocide" in the Gaza Strip.
"Our sole goal is to put an end to the war and to advance on the road of applying the two-state solution", Foreign Minister Jose Manuel Albares said at a press conference.
His statement came a week after Spain, along with Ireland and Norway, recognised the state of Palestine, sparking fury from Israel.
South Africa brought the case before the International Court of Justice last year, alleging that Israel's Gaza offensive, launched in retaliation for an unprecedented Hamas attack on Israel, breached the 1948 UN Genocide Convention.
Israel has strongly denied the accusation.
Set up after World War II, the Hague-based ICJ rules in disputes between states.
The ICJ on Friday ordered Israel to ensure "unimpeded access" to UN-mandated investigators to look into allegations of genocide.
In a ruling on January 26, the ICJ also ordered Israel to do everything it could to prevent acts of genocide during its military operation in Gaza.
But South Africa has since returned several times to the ICJ arguing that the dire humanitarian situation in the territory compels the court to issue further fresh emergency measures.
On May 24, the court ordered Israel to "immediately" halt its military offensive in the city of Rafah and keep open the key border crossing there for "unhindered" humanitarian aid.
It also called for the "unconditional" release of hostages taken by Palestinian group Hamas during its October 7 assault that sparked the war.
ICJ rulings are legally binding but the court has no concrete means to enforce them. For example, it ordered Russia to halt its invasion of Ukraine, to no avail.
(Except for the headline, this story has not been edited by NDTV staff and is published from a syndicated feed.)
Featured Video Of The Day
Cauvery Water Dispute: Is There A Solution In Sight?
India Sends First Tranche Of $2.5 Million For Palestinian Refugees 15 Killed In Israeli Strike On School Sheltering Displaced Gazans Hamas Says Pulling Out Of Gaza Truce Talks, As Israel Keeps Up Strikes Meet Indian-Origin Usha Chilukuri Vance, Wife Of Trump's Vice President Pick INDIA's Bihar Ally Mukesh Sahani's Father Brutally Murdered At Home "Regret To Inform...": Trainee IAS Officer's Disability Request Was Denied Man, 65, Who Quit Job, Drained Savings To Start Business, Now A Billionaire JD Vance, Once A Donald Trump Critic, Now His Vice President Pick: 5 Facts Patient Stuck In Kerala Hospital's Lift For 1.5 Days, 3 Staffers Suspended Track Latest News Live on NDTV.com and get news updates from India and around the world.