More than seven months of deadly fighting between Israel and Hamas have highlighted the gulf between Israeli and Palestinian leaders, testing the credibility of a long-sought two-state solution to the conflict.

Peace brokers have spent decades advancing the idea of two separate sovereign states living side by side in peace but the Israel-Hamas war since October 7 has brought a renewed sense of urgency.

Ireland, Norway and Spain announced on Wednesday that they would recognise the State of Palestine, joining seven other European countries that have already done so.

Israeli Prime Minister Benjamin Netanyahu has repeatedly stated his opposition to Palestinian sovereignty, angering foreign allies who insist on the Palestinians' right to statehood.

- Where did the idea come from? -

The two-state concept was born in the 1930s supported by Jewish immigrants who settled in Palestine, which was then ruled by Britain under League of Nations mandate.

In 1947, the UN General Assembly adopted a proposal to partition Palestine between separate Jewish and Arab states, paving the way for Israel to be established the following year.

- Was there opposition? -

Some Palestinian leaders opposed a Jewish state on what they viewed as Arab land, and the issue helped spark a wider revolt in 1936 against British rule in Palestine.

The UN partition plan and the declaration of the State of Israel became the trigger for the Arab-Israeli war of 1948-49.

Israel emerged stronger, seizing more territory, while the Palestinian suffered mass displacement.

In 1964, the Palestine Liberation Organization (PLO) was formed with the aim of establishing a Palestinian state over the entire territory of mandatory Palestine.

An Arab-Israeli war in 1967 saw Israel seize the Palestinian territories of the West Bank, including east Jerusalem, and the Gaza Strip.

Israel later annexed east Jerusalem, and successive Israeli governments have encouraged Jewish settlement in the Palestinian territories.

Under international law, the Palestinian territories remain occupied, and Israeli settlements in east Jerusalem and the West Bank are illegal.

- Was it ever close to happening? -

Hope for peace had surged in the early 1990s with the Oslo Accords, struck after secret Israeli-Palestinian talks in the Norwegian capital.

They established a limited degree of Palestinian self-rule, and were intended as an interim measure that would lead to Palestinian statehood, but talks tapered off.

The international community last made efforts at serious talks in 2013, said Xavier Guignard of Noria Research, a Paris-based think tank.

"Politically we have seen zero effort to make it feasible since then," he told AFP.

Foreign leaders have warned that the expansion of Israeli settlements threatens the viability of a contiguous Palestinian state.

- What do leaders say? -

The Palestinian Authority, which proceeded from the PLO and recognises Israel, formally supports two states.

Palestinian president Mahmud Abbas called in September for an international conference on the issue, saying it "may be the last opportunity to salvage the two-state solution".

In 2017, militant group Hamas for the first time accepted in principle a Palestinian state within pre-1967 borders, but held back from recognising Israel.

Netanyahu has largely opposed Palestinian statehood throughout his political career, while Guignard said the rise of far-right groups in Israeli politics had seen the idea widely rejected.

- What do the people think? -

The two-state solution has suffered a dramatic slump in popularity on both sides, opinion polls suggest.

A Pew survey of Jewish Israelis before the current Israel-Hamas war found support had fallen from 46 percent in 2013 to 32 percent last year.

A Gallup survey, also conducted before the war, found support among Palestinians in Gaza and the West Bank had slumped from 59 percent in 2012 to 24 percent last year.

Some Palestinian groups have continued to champion the idea of a single state with equal rights for all.

- What has changed during the Gaza war? -

On the world stage, the Israel-Hamas war has generated new momentum with leaders once again publicly calling for a solution to the conflict.

The UN General Assembly voted overwhelmingly this month to grant Palestinians additional rights in the world body, after their drive for full state membership was vetoed by the United States.

While President Joe Biden has repeatedly expressed support for a two-state solution, Washington has said it will oppose any recognition of a Palestinian state outside of a bilateral accord between the Palestinians and Israel.

The 22-member Arab League reiterated calls for Palestinian statehood at a summit this month, urging the convening of an international peace conference "to resolve the Palestinian issue on the basis of the two-state solution".

The G7 and the European Union have called for the creation of a Palestinian state since the war broke out.

But Netanyahu told US media this month that a two-state solution was "the greatest reward for the terrorists that you can imagine".

And former Hamas chief Khaled Meshaal in January dismissed a two-state solution as an "old commodity" being pushed by the West.

With positions hardening on both sides, analysts such as Guignard are less sanguine about the future of a two-state solution.