The United States said Wednesday the United Nations’ top court should not issue an advisory opinion saying that Israel should “immediately and unconditionally withdraw” from territories sought for a Palestinian state without getting security guarantees in return.

Acting State Department legal adviser Richard Visek told a 15-judge panel at the International Court of Justice in The Hague that it should not seek to resolve the decades-long Israeli-Palestinian conflict “through an advisory opinion addressed to questions focusing on the acts of only one party,” Israel.

“Any movement towards Israeli withdrawal from the West Bank and Gaza requires consideration of Israel’s very real security needs,” he argued.

The U.S. defense of Israel came on the third day of a week of hearings. The U.N. General Assembly asked the court for a non-binding advisory opinion on the legality of Israel’s policies in the occupied territories, which it annexed after the six-day Arab-Israeli War in 1967.

Fifty-two countries are offering their views on the Israeli occupation, with most demanding that Israel yield control.

Visek said the court “can address the questions before it within the established framework based on the land for peace principle and within the parameters of established principles of occupation law.”

But he said that any opinion the court hands down “will have consequences for the parties to the conflict and for the ongoing efforts of all of those working to achieve a durable peace.”

Earlier this week, Palestinian Foreign Minister Riad Malki called on the court to uphold the Palestinian right to self-determination and declare “that the Israeli occupation is illegal and must end immediately, totally and unconditionally.”

With the Israeli war against Hamas militants in Gaza now in its fifth month, the U.S. has continued to advance the idea of a Palestinian state, although Israeli leaders remain opposed.

The concept of land for peace has been at the forefront of U.S.-led diplomacy for decades and was the basis of the 1979 Camp David Accords between Israel and Egypt, in which Israel withdrew from the Sinai Peninsula in return for peace and diplomatic recognition by Egypt.

But Israeli-Palestinian peace efforts have long been thwarted because of Palestinian militant attacks, Israel’s expansion of settlements in occupied territory and the inability of the two sides to agree on thorny issues like final borders, the status of Jerusalem and the fate of Palestinian refugees.

The Israel-Hamas war started with the militants’ October 7 attack on Israel that killed 1,200 people and led to the capture of about 240 hostages. Israel’s counter-offensive on Hamas in Gaza has killed more than 29,000 people, more than 70% of them women and children but also 5,000 to 9,000 Hamas fighters.

The U.S. arguments at the world court came a day after Washington vetoed an Arab-backed and widely supported U.N. resolution demanding an immediate humanitarian cease-fire in the Israel-Hamas war. The U.S. said the resolution would interfere with negotiations on a deal to free about 100 remaining hostages.

Some material in this report came from The Associated Press and Agence France-Presse.