Following the quick collapse of the ceasefire in Gaza, the Israeli prime minister, Binyamin Netanyahu, told the White House not to force a truce with Palestinian militants.

Sources familiar with conversations between Netanyahu and senior US officials, including the secretary of state, John Kerry, say the Israeli leader advised the Obama administration “not to ever second-guess me again” on the matter. The officials also said Netanyahu said he should be “trusted” on the issue and about the unwillingness of Hamas to enter into and follow through on ceasefire talks.

The Obama administration on Friday condemned “outrageous” violations of an internationally brokered Gaza ceasefire by Palestinian militants and called the apparent capture of an Israeli soldier a “barbaric” action.

The strong reaction came as top Israeli officials questioned the effort to forge the truce, accusing the US and the United Nations of being naive in assuming Hamas would adhere to its terms. The officials also blamed the Gulf state of Qatar for not forcing the militants to comply.

With the ceasefire in tatters less than two hours after it took effect, with an attack that killed two Israeli troops and left a third missing, President Barack Obama demanded that those responsible release the soldier.

Obama and other US officials did not directly blame Hamas for the abduction. But they made clear they hold Hamas responsible for, or having influence over, the actions of all factions in the Gaza Strip. The language was a distinct change from Thursday, when Washington was focused on the deaths of Palestinian civilians.

“If they are serious about trying to resolve this situation, that soldier needs to be unconditionally released as soon as possible,” Obama told reporters. He added that it would be difficult to revive the ceasefire without the captive’s release.

“It’s going to be very hard to put a ceasefire back together again if Israelis and the international community can’t feel confident that Hamas can follow through on a ceasefire commitment,” he said. His comment reflected uncertainty in the US and elsewhere that Hamas was actually responsible for the incident or if some other militant group was to blame.

At the same time, Obama called the situation in Gaza “heartbreaking” and repeated calls for Israel to do more to prevent Palestinian civilian casualties.

Despite the collapse of the truce, Obama credited Kerry for his work with the United Nations to forge one. He lamented criticism and “nitpicking” of Kerry’s attempts and said the effort would continue.

Kerry negotiated the truce with the UN secretary-general, Ban Ki-moon, in a marathon session of phone calls over several days while he was in India on an official visit. Kerry had spent much of the past two weeks in Egypt, Israel, the West Bank and France trying to mediate a ceasefire, with Qatar and Turkey playing a major role because of their close ties with Hamas.

Those efforts failed with Israel saying it could not trust Hamas and some Israelis and American pro-Israel groups complaining that the US was treating the group – a foreign terrorist organisation as designated by the State Department – as a friend. Late on Thursday, however, Israel accepted Kerry and Ban’s latest proposal, despite its reservations. Once the truce was violated, though, Israeli officials hit out at not only Hamas, but the US and Qatar for its failure.

An Israeli official said the Netanyahu government viewed both Hamas and Qatar as having violated the commitment given to the US and the UN and that it expected the international community to take practical steps as part of a “strong and swift response”, especially regarding the return of the abducted soldier.

In a phone call with US ambassador to Israel Dan Shapiro, Netanyahu vented his anger, according to people familiar with the call.

Netanyahu told Shapiro the Obama administration was “not to ever second-guess me again” and that Washington should trust his judgment on how to deal with Hamas, according to the people. Netanyahu added that he now “expected” the US and other countries to fully support Israel’s offensive in Gaza, according to those familiar with the call. They spoke on condition of anonymity because they were not authorised to discuss the matter by name.

They said Netanyahu made similar points to Kerry, who himself denounced the attack as “outrageous,” saying it was an affront to assurances to respect the ceasefire given to the United States and United Nations, which brokered the truce.