The United Kingdom could recognize an independent Palestinian state before an official process creating one is agreed upon between Israel and the Palestinians, according to Britain’s top diplomat.

Foreign Secretary David Cameron told The Associated Press in Lebanon on Thursday that his country could move unilaterally to recognize a Palestinian state before what could be yearslong negotiations on a two-state solution, calling it "absolutely vital for the long-term peace and security of the region."

"What we need to do is give the Palestinian people a horizon towards a better future, the future of having a state of their own," added Cameron, also a former British prime minister. "It could be something that we consider as this process, as this advance to a solution, becomes more real."

While the idea of a two-state solution has been floated in the past, there have been no substantive negotiations since 2009.

ISRAEL SHARES DOSSIER SPELLING OUT ALLEGATIONS AGAINST 12 UN EMPLOYEES ALLEGEDLY INVOLVED IN HAMAS ATTACK

David Cameron, Najib Mikati

Britain's Foreign Secretary David Cameron, left, discussed with Lebanese officials the volatile situation in the Middle East during a stop in Beirut as part of a regional tour. (AP Photo/Bilal Hussein)

Western countries, including Britain and the U.S., support the idea of an independent Palestinian state existing alongside Israel, believing the two-state outcome could be a solution to hostilities across the region.

Cameron said the idea would only be pursued after a cease-fire in Gaza is implemented, saying the first step must be a "pause in the fighting" in Gaza which could eventually turn into "a permanent, sustainable cease-fire."

Netanyahu, Israeli flag

Israeli Prime Minister Benjamin Netanyahu said Israel could continue fighting inside the Gaza Strip for several more months as Israeli forces seek to eradicate the Hamas terror group from the Palestinian territory. (Photo by ABIR SULTAN/POOL/AFP via Getty Images)

U.K. recognition of a Palestinian state "can’t come at the start of the process, but it doesn’t have to be at the very end of the process," he added. The U.K. would also recognize it in the United Nations, he said.

BIDEN SAYS PALESTINIANS 'DESERVE A STATE OF THEIR OWN' IN CALL FOR TWO-STATE SOLUTION 'FREE FROM HAMAS'

He clarified that no recognition could come while Hamas, which is designated a foreign terrorist group, continued to rule in Gaza "because you can’t have a two-state solution with Gaza still controlled by the people responsible for Oct. 7."

Palestinian supporters in London

Protesters rallied in support of Palestinians on Westminster Bridge, near the Palace of Westminster, home of the Houses of Parliament, in London on Oct. 28, 2023, to call for a cease-fire in the conflict between Israel and Hamas. (HENRY NICHOLLS/AFP via Getty Images)

The line was a reference to the Hamas-led terror attack on Israeli border communities on Oct. 7, 2023, that left more than 1,200 people in Israel dead.

CLICK HERE TO GET THE FOX NEWS APP

Israeli Prime Minister Benjamin Netanyahu has rejected the creation of an independent Palestinian state after the war.

The Associated Press contributed to this report.