ELKHART, Ind. — President Trump was remarkably on message — for him.

Addressing a large public school gymnasium on the north side of Elkhart on Thursday night, the president, known for his freewheeling and off-script campaign-style rallies, played the role of Midterm Trump. He spurred the crowd of thousands to support Republicans on the ballot in November and reserved special attention and praise for Mike Braun, the businessman who on Tuesday officially became Indiana’s Republican Senate nominee who is set to take on Sen. Joe Donnelly, one of the most endangered Democratic incumbents.

“We need Mike Braun in the Senate, and that’s going to happen,” Trump said. “Now if Joe Donnelly — Sleeping Joe — [and] the Democrats get back into power, remember what I said, they will raise your taxes — he wants to raise your taxes — they will destroy your jobs, and they are going to knock the hell out of your borders.”

Though Trump didn’t mention the midterm elections until nearly 12 minutes into his nearly hour-long speech, he largely seemed to hew to his Teleprompters and wove throughout a consistent message that the 2018 elections are pivotal to his and his party’s success. He told the crowd that what they have achieved together is unprecedented — but it could all vanish and go away — and urged them to elect more Republicans.

“It can disappear quickly,” Trump warned. “It can also disappear if you put fools and you put the wrong people in. It can disappear.”

The president has a mixed record as a campaign trail booster. In some races — most notably the Alabama Senate race last year that was won by a Democrat — his endorsements have been so tepid that his reticence became the story, not the candidate he was ostensibly supporting.

But Thursday night in Indiana, Trump called out a slew of Republicans on the ballot here by name, and even invited Braun onstage to make some brief remarks.

“I’m a businessman and an outsider, just like our president,” Braun said, albeit to slightly less enthusiasm than the actual president engendered; most everyone in the stands sat down as Braun was speaking.

Trump then thanked Braun — whom he called “a winner” and a “great businessman” — and continued his attacks on Donnelly. “Joe Donnelly voted no on tax cuts, no on better health care, and he voted no on canceling job-killing regulations, which may be even more important than those incredible tax cuts,” he said. 

“Joe Donnelly will do whatever Chuck Schumer and Nancy Pelosi tell him what to do,” Trump continued with a flourish, referring to the Democratic leaders of the Senate and House. “They say, ‘Joe, this is the way you’re going to vote.’ ”

Donnelly is a top target for Republicans looking to take out red-state Democrats in the midterm elections. Braun, who campaigned by mocking Washington and calling himself an “outsider,” won the Tuesday’s primary contest after refusing to wear a sport coat or tie to debates. He also embraced the core concerns about immigration and unfair trade deals that had cemented the Trump coalition.

Though the White House political operation has struggled to find its footing, the president himself — who loved the frenzied and energetic rallies of his own 2016 presidential bid — has expressed eagerness to hit the campaign trail.

Trump arrived in Indiana during a week that has been dominated by his foreign policy decisions. On Tuesday, Trump announced, to international concern, that he is pulling the United States out of the international nuclear deal with Iran and reimposing economic sanctions against Tehran.

And earlier Thursday, Trump declared that he would hold his upcoming summit with North Korean leader Kim Jong Un in Singapore on June 12. The announcement came just hours after the president greeted at Joint Base Andrews outside Washington three American prisoners who had been released by Kim as a goodwill gesture ahead of the meeting.

“I think it’s going to be a very big success,” Trump told the crowd, referring to the summit. “But my attitude is: And if it isn’t, it isn’t. Okay? If it isn’t, it isn’t. But you have to have that, because you don’t know.”

Throughout the rally, Trump generally reprised the PG-version of his greatest hits, offering a tough line on immigration and trade, touting the nation’s low unemployment rate and “soaring confidence,” and at one point — in mid-May — declaring with relish that Americans are now saying “Merry Christmas again.”

Yet for all his talk of others, the president also couldn’t help but return to his chief ideology — himself. At one point, he praised Rep. Keith Ellison (D-Minn.), the Democratic National Committee deputy chair, for saying in an interview with ABC News when Trump first announced his candidacy that he was going to win.

“So in one sense, I have to respect him,” Trump said. “He said he’s going win, so you can never dislike a guy like that.”

Parker reported from Washington. Victoria St. Martin in Elkhart, Ind., contributed to this report.