ELKHART, Ind. — After days of high-stakes negotiations with foreign governments, President Trump traveled to a rally here Thursday night, briefly swapping his role as grim-faced statesman for one that comes more naturally to him: campaign trail firebrand.

In a visit meant to bolster Mike Braun, a wealthy former state legislator who won a bruising Republican Senate primary this week, Mr. Trump appeared before an excited crowd to share his administration’s track record: North Korea had freed three American prisoners. The United States had withdrawn from the nuclear agreement with Iran. And the American Embassy would soon open in Jerusalem.

The president’s message to his voters was clear — because of his efforts, “America is respected again.”

Also clear was his message to the supporters who packed the 7,300-capacity middle school gym here: That progress could quickly disappear if the balance of the Senate tips against Republicans this fall.