The White House has confirmed that a US envoy spoke directly with Hamas to secure American hostages, a break in policy for the United States, which considers the Palestinian militants a terrorist organisation.
"Israel was consulted on this matter, and look, dialogue and talking to people around the world to do what's in the best interest of the American people is something that the president" believes is right, Press Secretary Karoline Leavitt told reporters.
She said that the US hostage envoy, Adam Boehler, "does have the authority to talk to anyone," despite the usual US ban on dealing with terrorist groups.
"There are American lives at stake," she said.
Axios first reported on the talks, saying that Mr Boehler met Hamas representatives in the Qatari capital Doha in recent weeks.
While focused on securing the release of hostages, he discussed freeing them as part of a long-term truce, the news site said, citing anonymous sources.
Israel confirmed it had been consulted by the US on the direct talks with Hamas.
"In consultation with the United States, Israel expressed its opinion on direct talks with Hamas," Israeli Prime Minister Benjamin Netanyahu's office said in a statement.
Hamas officials have said the group has held direct talks with a US envoy on freeing hostages held in Gaza.
"Several communications took place between Hamas and various American communication channels, the latest being with a US envoy and discussed the issue of Israeli prisoners who hold American citizenship, both the living and the deceased," said a Hamas official who asked to remain anonymous.
A second senior Hamas official said there had been "two direct meetings between Hamas and US officials in Doha in recent days".
New IDF chief appointed amid Gaza ceasefire impasse
It comes as Israel has sworn in a new commander of its military as a standoff over the fragile ceasefire in Gaza increased the risk of a resumption of fighting without an agreement to bring home the rest of the hostages still held by Hamas.
"I accept command of the (Israeli military) with modesty and humility ... Hamas has indeed suffered a severe blow, but it has not yet been defeated. The mission is not yet accomplished," Lieutenant General Eyal Zamir said at his inauguration, amid deadlock in negotiations on next steps in a ceasefire with Hamas in Gaza.
"The mission I have been given is clear, to lead the IDF to victory," he said.
Speaking before Lt Gen Zamir at the ceremony at military headquarters in Tel Aviv, Mr Netanyahu told him that Israel is "determined" to achieve victory in the war that began with Hamas's October 2023 attack on Israel.
"A very heavy responsibility rests on your shoulders, the results of the war will have significance for generations, we are determined to achieve ... victory", Mr Netanyahu said.
Lt Gen Zamir, a former tank commander, served under Mr Netanyahu as military adviser a decade ago.

He will also take over operations in the occupied West Bank, where the military has deployed tanks in recent weeks for the first time in 20 years.
Lt Gen Zamir's appointment comes as a series of official inquiries have begun to examine the failures that allowed thousands of Hamas-led gunmen to storm Israeli communities on 7 October 2023, killing 1,200 people and seizing 251 hostages in one of the biggest military and security disasters in Israel's history.
Lt Gen Herzi Halevi led the military during the Israeli campaign in Gaza that killed more than 48,000 Palestinians and destroyed much of the territory, leaving most of the population sheltering in tents or bombed-out buildings.
We need your consent to load this rte-player contentWe use rte-player to manage extra content that can set cookies on your device and collect data about your activity. Please review their details and accept them to load the content.Manage Preferences
But he announced in January, soon after the Gaza ceasefire deal was agreed, that he would step down from his command, accepting responsibility for the military's patchy and uncoordinated response to the 7 October attack.
Both the Israel Defence Forces and the Shin Bet security agency have acknowledged that their failures allowed the attack to take place but Mr Netanyahu has so far resisted a more general inquiry that would look at the responsibility of his government.
The new commander will also have to respond to accusations from international bodies, including the United Nations, that Israeli troops committed war crimes during the campaign in Gaza.
Israel rejects those charges, which it says are motivated by political hostility towards the state of Israel but it has indicted some individual reservist soldiers for severe abuse of detainees.
Israel says Hamas, which has also been accused of war crimes by United Nations bodies, committed multiple atrocities during the 7 October attack and severely abused Israeli hostages in Gaza.
Hamas denies the accusations.
A related war in southern Lebanon, which broke out after Iranian-backed Hezbollah forces launched missile strikes against Israel after the 7 October attack, has also been silenced by a separate ceasefire agreement.

Fighting in Gaza has been halted since 19 January under a truce brokered by Qatar and Egypt and supported by the United States that has allowed the exchange of 33 Israeli hostages and five Thais for around 2,000 Palestinian prisoners and detainees.
But Israeli ministers and officials have warned that their forces could resume fighting if there is no agreement on bringing back the 59 hostages that remain.
Israeli troops have pulled back from some of their positions in Gaza but talks that were intended to agree the release of the hostages and the full withdrawal of Israeli forces before an end to the war have not begun.
Israel has called for an extension of the truce until after the Jewish Passover holiday in April to allow the release of the remaining hostages, while Hamas has insisted on proceeding to talks on a permanent end to the war before agreeing to any further releases.