ISTANBUL — The deaths of at least 60 people in Gaza this week have not only inflamed relations between Turkey and Israel. They have added a powerful new element to President Recep Tayyip Erdogan’s re-election campaign, as he seizes the issue to further a longstanding ambition to position himself as a leader among Muslim states.

The Israeli-Palestinian conflict may no longer be high on the agenda of world affairs, but it has taken over the campaign before voting on June 24, when Mr. Erdogan hopes to be re-elected to a more powerful presidency.

On Friday, Mr. Erdogan called a large political rally in support of Palestinians and gathered leaders of the 57-member Organization for Islamic Conference in Istanbul for a summit meeting to protest the deaths on Monday, the same day President Trump moved the United States embassy in Israel to Jerusalem, a step many had hoped would come with a peace settlement.

“As Muslims we do not and cannot do anything other than denounce,” Mr. Erdogan told the crowd of thousands waving Turkish and Palestinian flags and guests who included the Palestinian prime minister. But he warned, “One day the mistakes of this administration will rebound on America.”