The abduction by Hamas of over 200 hostages seized from southern Israel on 7 October has propelled the small, gas-rich Arab Gulf state of Qatar into the diplomatic spotlight. Their fate is, to some degree, in Qatar's hands.
Why? For the simple reason that Qatar is fulfilling a unique role as the principal mediator between Israel and its avowed enemy, Hamas.
Both President Joe Biden and Prime Minister Rishi Sunak have so far thanked Qatar and its ruling emir for its role in securing the release of four hostages. On Wednesday, Israel's national security adviser added his appreciation.
Qatar is confident that with time, patience and persuasion it can negotiate the release of dozens more hostages in the coming days, although any Israeli ground incursion into Gaza would make this far harder.
These hostages, say Qatari officials, would most likely be dual-nationals and non-Israelis.
Hamas is expected to want to hang on to the Israeli servicemen it has kidnapped in the hopes of exchanging them for Palestinian prisoners held in Israeli jails.
But this also comes with serious risk for Qatar.
As horrific details of Hamas's attack have emerged, some are questioning why this major western ally, which hosts a US military base, is providing a home for the political wing of an organisation proscribed as terrorist by the UK, US and others.
If Qatar's efforts going forward prove largely fruitless then its standing in the West will suffer and pressure on Qatar to close that office may ensue.
To say that these negotiations over hostages are delicate would be an understatement.
Israel is still reeling from the horrific attacks by Hamas and others on that fateful morning of 7 October when the gunmen burst through the border fence, killing around 1,400 people.
Gaza is home to 2.3 million Palestinians and the military wing of Hamas, which has governed the territory since 2007.
It has been pounded by more than two weeks of near round-the-clock Israeli air strikes, killing over 5,000 people so far, according to the Hamas-run Health Ministry in Gaza. The UN is calling for an urgent ceasefire.
Israel has vowed to destroy Hamas which is designated a terrorist organisation by the UK, US and other nations. Little wonder then that the two sides need a mediator in the middle.
So how do these hostage negotiations work?
Qatar is home to the political leadership of Hamas which has had an office in the capital, Doha, since 2012, headed by its leader Ismail Haniyeh.
Amid the glittering, plate glass and steel skyscrapers of modern Doha, Hamas officials have been sitting down with Qatari diplomats from the Ministry of Foreign Affairs to work through the complex issue of hostage releases.
The Qatari mediators are not new to this, I am told.
They are from a special government department that oversees the relationship with Hamas in Gaza that has enabled Qatar to pay hundreds of millions of dollars annually to keep Gaza's infrastructure and civil service functioning.
Many of the Qatari officials have been to Gaza and are well known to senior Hamas figures.
Unlike its Gulf neighbours Bahrain and the UAE, Qatar has no formal diplomatic relationship with Israel although in the 1990s it did host an Israeli trade office.
But there are back-channel communications and at key moments during the hostage discussions Qatari officials have been able to speak to their Israeli interlocutors on the phone.
There are a lot of factors at work here.
Hamas seems to gain little from the release of its hostages, but the organisation, which is an Arabic acronym for The Islamic Resistance Movement, has already been criticised for kidnapping women and children. This, says a senior Saudi prince, Turki Al-Faisal, is against Islamic injunctions.
Some analysts believe Hamas wants those hostages, and possibly all its foreign ones too, off its hands sooner rather than later. "It's bad optics for them," says Justin Crump from the strategic thinktank Sibylline.
He points out that keeping the location of so many hostages secret from Israel, as well as feeding and caring for them during a war, must present Hamas with a major logistical challenge.
Qatari officials, though, say releasing hostages buys Hamas time.
With so many families in Israel and elsewhere desperate to secure the release of their loved ones by peaceful means there is mounting pressure on the Israeli government to delay its much vaunted ground incursion into Gaza. It is widely assumed that if and when that begins then the talking will stop.
Then there are the mechanics of the actual releases.
As expected, Hamas has kept them hidden in tunnels underground. Those few that have been released have been handed over to the International Committee of the Red Cross.
But transferring up to 50 individuals or more, as has been talked about, would require a pause in the near-relentless airstrikes. Hamas would like to turn that pause into a ceasefire.
But the Israeli government of Benjamin Netanyahu has vowed to prosecute this war until Hamas is destroyed and is therefore reluctant to grant Hamas any kind of a breathing space.
This is not the first time Qatar has emerged as a useful mediator.
For years it hosted a de facto embassy for the Taliban when they were out of power in Afghanistan. I remember reporting on it in 2013 when the Taliban infuriated the Afghan government in Kabul by raising their white flag inside their compound in Doha.
Although the US and its allies were at war with the Taliban it actually suited Washington to have an address where they could talk to them, resulting in the controversial 2020 peace deal that led to the chaotic western pull-out from Kabul the following year.
Residents of Doha used to remark on the extraordinary sight of burly, heavily bearded Taliban commanders, dressed in their shalwar kameez, taking their wives shopping for the latest western boutique fashions in the air-conditioned malls of Doha.
In Iraq and Syria, the Qataris have used their well-connected intelligence contacts to secure the release of certain hostages held by Islamic State (ISIS).
More recently, this year Qatar negotiated the return to their families of four Ukrainian children who had allegedly been abducted by Russia, following a request by Ukraine for Qatar to mediate with Moscow on its behalf.
All of this makes Qatar a valuable partner for a lot of countries, some of whom have been beating a metaphorical path to its door as they seek its help in getting their people out of Gaza.
But Qatar was already walking a curious diplomatic tightrope even before this crisis.
Whether it comes out well from this conflict will depend in large part on whether it can succeed in de-escalating the dire situation in Gaza and deliver on its efforts to secure the release of as many hostages as possible.