(Bloomberg) -- Prime Minister Rishi Sunak resisted calls for the UK to back a ceasefire between Israel and Hamas, as both he and opposition Labour Party leader Keir Starmer came under pressure to shift their stance on the conflict.

“The first and most important principle is that Israel has the right to defend itself under international law,” Sunak told Parliament on Wednesday. But he added that a “safer environment” is needed to address humanitarian needs and for Israeli hostages held by Hamas to be released. That “necessitates specific pauses, as distinct from a ceasefire,” he said. His spokesman later told reporters that a full ceasefire would be too beneficial to Hamas.

The Israel-Hamas war has severely strained community tensions in the UK that Sunak and other political leaders are struggling to navigate. The prime minister again referred to the aid Britain is sending to Gaza, reflecting the political balancing act between his support for Israel’s military response to Hamas’s attack this month, while acknowledging the struggles of Palestinians that are angering members of Britain’s Muslim community.

Read More: London’s Jews Hide Their Faith While Graffiti Smears UK Muslims

That Sunak was responding to a question from the Scottish National Party, rather than the main opposition Labour Party, was also revealing. Starmer’s support for Israel’s right to defend itself aligns Labour with the UK government, while also serving to distance the party from past accusations of anti-Semitism under a previous leadership.

His stance also makes members of his party uncomfortable, in part because many British Muslims have traditionally voted Labour. At Prime Minister’s Questions, Starmer focused his six questions to Sunak mainly on domestic issues including housebuilding. But later on Wednesday, he met some Labour Members of Parliament as he seeks to calm tensions.

“It is incumbent on all parties to make sure that the aid and utilities don’t just get in but reach those who need them,” Starmer said in a statement after the meeting. “In the long term there can only be a political solution to this crisis which is why we need to restart the hard work of talks for a two-state solution of a viable Palestinian state alongside a safe and secure Israel.”

It was a Starmer interview with LBC radio that triggered much of the anguish within Labour, because it was interpreted as him backing Israel’s “right” to cut off power and water from Gaza. The Labour leader later acknowledged the “distress” caused by the remarks and tried to clarify his position, arguing that he did not mean to back a siege on Gaza.

Read More: Labour’s Israel-Gaza Tensions Mar Week of Starmer Triumphs

Yet the row has continued. A visit to calm tensions backfired when the South Wales Islamic Centre said Starmer “gravely misrepresented” his meeting with Muslim leaders on Sunday. Separately on Wednesday, a group of about 35 to 40 Labour MPs met to discuss their concerns about Labour’s stance on the Israel-Hamas conflict, two people familiar with the matter said. 

Many of them have also signed a non-binding motion in Parliament calling for a ceasefire in the region. Other backers include former Labour leader Jeremy Corbyn, who was expelled from the parliamentary party over his response to allegations of anti-Semitism on his watch.

But in a sign of how the conflict is exacerbating tensions across the political spectrum, two Conservative MPs have also signed the motion, expressing their “deep alarm” at Israel’s military bombardment and “total siege” of Gaza.

(Updates with Starmer comment in sixth paragraph.)

©2023 Bloomberg L.P.