Uneasy lies the head that wears a crown.On Wednesday night, Joe Biden basked in the pageantry of a state dinner – white-jacketed violinists, golden chandeliers dotted with pink roses, a vivid wall display of 3D paper flowers. But soon after toasting the Australian prime minister in a pavilion on the White House south lawn, the US president had to step away to be briefed on a deadly mass shooting in Maine.The presence of Lloyd Austin, the defense secretary, and Jake Sullivan, the national security adviser, was a reminder of another, even darker shadow. Even as Biden and guests savoured butternut squash soup, sarsaparilla braised short ribs and hazelnut and chocolate mousse cake, Israeli bombs were raining down on the people of Gaza, posing one of the biggest tests yet for the 80-year-old commander-in-chief.Biden took office in January 2021 articulating four crises – the coronavirus pandemic, economic strife, racial injustice and the climate – but as many of his predecessors discovered, the one guarantee of the job is the unexpected. Since Hamas’s horrific attack on Israel on 7 October, the president has found himself in the crucible of a Middle East war that is killing innocents and threatening a broader conflagration.Biden has given Israel full-throated support and urged Congress to send the US ally $14bn in military aid. He has stressed that Hamas does not represent the vast majority of the Palestinian people and pushed for humanitarian assistance. But he is resisting calls for a ceasefire. He is trying to thread a diplomatic needle, knowing that each decision reverberates around the world and one mistake could cost him re-election next year.“Biden’s been at the top of his game – pitch perfect, morally clear, decisive – but there are real risks to having no daylight between the US and Israel,” said Chris Whipple, author of The Fight of His Life: Inside Joe Biden’s White House. “We’re starting to see that now with all the civilian casualties that are mounting.”“It reminds me of Colin Powell’s old Pottery Barn rule: if you break it, you own it. Along with Israel, the US is going to own the spectacle of Palestinian civilians being killed no matter how ‘surgical’ the IDF [Israel Defense Forces] claims to be and we’re already seeing that.”Biden’s allegiance to Israel is written in his political DNA. He was born during the presidency of Franklin Roosevelt when, in Europe, the Nazis were systematically murdering 6 million Jews in the Holocaust. Biden has said how his father helped instill in him the justness of establishing Israel as a Jewish homeland in 1948.His long political career has long included deep engagement with the Israeli-Arab conflict in the Middle East. He has often told the story of his 1973 encounter with Israel’s then prime minister Golda Meir who, on the cusp of the Yom Kippur war, told the young senator that Israel’s secret weapon was “we have no place else to go”.During 36 years in the Senate, Biden was the chamber’s biggest ever recipient of donations from pro-Israeli groups, taking in $4.2m, according to the Open Secrets database. As vice-president, he mediated the rocky relationship between Barack Obama and Israeli prime minister Benjamin Netanyahu.Brett Bruen, a former global engagement director for the administration, recalled: “I remember in the Obama White House how pissed off we were at Netanyahu for coming to town and addressing a joint session of Congress without so much as a heads-up. The animosity towards Netanyahu among the current national security staff at the White House is palpable and yet obviously it isn’t about personalities, it isn’t about politics – it’s about the principles that are at stake here.”Biden’s own relationship with Netanyahu is hardly uncomplicated. He recently recalled how, as a young senator, he had written on a photo of himself and Netanyahu: “Bibi, I love you. I don’t agree with a damn thing you say.”That point was illustrated in recent months with the White House echoing Israeli opponents of Netanyahu’s plan to curb the powers of the country’s supreme court. All that was put aside, however, after 7 October when Hamas gunmen killed 1,400 people and took more than 200 hostages.Standing beneath a portrait of Abraham Lincoln, Biden gave one of the most visceral, heartfelt speeches of his presidency, denouncing “an act of sheer evil” by Hamas and insisting “the United States has Israel’s back”. It was received rapturously in Israel and helped to quell any scepticism about where the president stood.Biden then travelled to Israel, marking his second visit as president to an active war zone not under US military control after a trip to Ukraine earlier this year. In Tel Aviv, he met Netanyahu and his war cabinet and displayed his celebrated empathy as he comforted victims’ families.He compared the 7 October assault to the September 11 terrorist attacks on the US that killed nearly 3,000 people. But he added: “I caution this: while you feel that rage, don’t be consumed by it. After 9/11, we were enraged in the United States. And while we sought justice and got justice, we also made mistakes.”Biden’s gambit was widely reported to be a public embrace of Netanyahu while trying to restrain him behind the scenes – including with US military advisers – so as to mitigate the civilian death toll, avoid complicating the release of American hostages and prevent the war from spreading into a regional conflict.Bill Galston, a senior fellow at the Brookings Institution thinktank in Washington, said: “He has chosen the classic diplomatic course of amity and unity in public and candour in private. I think Israelis understand and appreciate that. ”The president was said by officials to have asked Netanyahu “tough questions” about what would come in the days, weeks and months after a ground invasion of Gaza. Egypt and Israel agreed to allow a limited number of trucks carrying food, water, medicine and other essentials into Gaza via the Rafah border crossing.Back in Washington, the president then tried to sell his mission to the American people, using the ultimate bully pulpit, an Oval Office address, to make a direct connection between Israel’s fight against Hamas and Ukraine’s war against Russia. The commander-in-chief said: “American leadership is what holds the world together … To put all that at risk if we walk away from Ukraine, if we turn our backs on Israel, it’s just not worth it.”skip past newsletter promotionafter newsletter promotionBut the president is under pressure for a balanced approach from Arab leaders in Egypt, Iraq, Jordan and beyond who have seen major protests erupt in their capitals over the crisis in Gaza.In theory, the crisis could turn Biden’s political weakness – his age – into an asset that points to his unrivalled foreign policy experience. Leon Panetta, a former defence secretary and CIA director, said: “He gets it. He understands it. He understands what I think he sees as the end game here … There’s a lot of balls in the air but if anybody understands how to basically work his way through that, it’s Joe Biden.”Keeping all the balls in the air at once can be tricky. At a Rose Garden press conference on Wednesday, he said “there has to be a vision of what comes next” – a two-state solution – and expressed alarm about extremist settlers attacking Palestinians in the West Bank, “pouring gasoline on fire”.But under questioning, he also angered some on the left by questioning the death toll in Gaza: “I have no notion that the Palestinians are telling the truth about how many people are killed.”The Gaza-based health ministry – an agency in the Hamas-controlled government – says 7,028 Palestinians, including 2,913 minors, have been killed by the bombing. Shortages of water, electricity, fuel, food and medicine are making the humanitarian situation more catastrophic by the day and prompting a global outcry against Israel’s tactics – and the US’s unwavering support for it.Many Palestinians and others in the Arab world regard Biden as too biased in favor of Israel to act as an evenhanded peace broker. His blanket refusal to join calls for a ceasefire also risks alienating elements of his own Democratic party coalition, exposing a generational divide between Biden, who grew up knowing Israel as a vulnerable country and safe haven for Jews, and younger progressives who associate it primarily with the oppression of Palestinians.A recent NPR/PBS NewsHour/Marist poll found that only 48% of Gen Z and millennials believe the US should publicly voice support for Israel. Protests demanding a ceasefire have erupted on university campuses across the country. Rashida Tlaib, the only Palestinian American in Congress, told supporters: “President Biden, not all America is with you on this one, and you need to wake up and understand. We are literally watching people commit genocide.”Rae Abileah, a strategy consultant based in Half Moon Bay, California, argues that Biden’s words do not match his actions, which are pouring fuel on the flames. She said: “My message to President Biden, as a Jewish clergy person with family who are in Israel, is to say my grief is not your weapon. Do not use my faith or my grief to justify $14bn of military aid going to kill innocent lives.”“The big thing we have to talk about around Biden’s policies right now, and the policies of 10 US senators who flew to Tel Aviv as well, is that this is putting the blood of children in Gaza on our hands as American taxpayers. This is our responsibility. This is not about a war of Israel attacking Gaza; this is enabled with our money.”In addition, Biden is facing a backlash from Arab Americans and American Muslims. Haroon Moghul, an American Muslim academic and preacher based in Cincinnati, Ohio, said: “I voted for Biden in 2020. I thought he would be the adult in the room and right now all I see him doing is taking American resources, American political capital, American goodwill and throwing all in with the most radical Israeli government in history.”Biden’s job approval rating among Democrats has fallen 11 percentage points in the past month to 75%, according to pollster Gallup, the party’s worst assessment of the president since he took office. Gallup cited Biden’s immediate and decisive show of support for Israel as turning off some members of his own party. He is likely to face former president Donald Trump in an election a year from now.Matthew Hoh, associate director of the Eisenhower Media Network, who served as a US Marine Corps captain in Iraq, said: “Could 2, 3, 4 million progressive voters not turn out, not vote for Biden because of this? That’s absolutely possible.”Additional reporting by Lauren Gambino More