WASHINGTON — President Trump and senior members of his administration exulted on Monday over the opening of the United States’ new embassy in Jerusalem, dismissing the violence raging along the border with Gaza as the ceremony unfolded as “unfortunate propaganda.”

For Mr. Trump, the opening of the embassy was an opportunity to keep a campaign promise, and was yet another example of his willingness to upend decades of conventional thinking on foreign policy and to do what other American presidents had not dared. But the split-screen image of the carnage nearby was a sobering reminder that what Mr. Trump is claiming as a foreign policy coup has only complicated the prospects for the Middle East peace the president has said he is seeking.

The White House said the violence in Gaza would not hinder its efforts to seek an end to the conflict between the Israelis and the Palestinians, but the administration also made it abundantly clear on Monday that Mr. Trump was currently siding with Israel.

“The responsibility for these tragic deaths rest squarely with Hamas,” said Raj Shah, a White House deputy press secretary, who referred to Gaza as “southern Israel.” “Hamas is intentionally and cynically provoking this response, and as the secretary of state said, Israel has the right to defend itself.”