Unlike some of Mr. Trump’s previous rallies, which were part lobbying for Republican candidates, part freewheeling return to fiery campaign speeches, this rally was solely for him: indulging in a greatest hits of triumphs and grievances in front of a crowd of autoworkers, farmers and others.
Crowded on the AstroTurf of a sports complex, supporters chanted “Lock her up” at the mention of Hillary Clinton, booed every reference to a Democrat, and chanted “Nobel” when the president boasted that he deserved virtually all the credit for the historic summit meeting between Kim Jong-un of North Korea and President Moon Jae-in of South Korea on Friday.
While the two leaders agreed to pursue a peace treaty and work toward ridding the peninsula of nuclear weapons, experts have warned that it is unclear whether Mr. Kim is sincere about giving up his nuclear arsenal or is instead leveraging the talks for relief from severe economic sanctions. But Mr. Trump claimed to have made more progress in the longstanding conflict than anyone ever had.
“What do you think President Trump has to do with it?” Mr. Trump said, paraphrasing a newscast earlier this week.
“I’ll tell you what,” he answered to roaring applause. “Everything.”
But even as Mr. Trump lauded the success of the tax cuts passed last year and the impact of his push to roll back regulations, he often descended into a darker portrait of the country. He returned repeatedly to the theme of immigration, asserting that the country was being overwhelmed by migrants coming into the country illegally.
But at the same time he railed against weak borders and “corrupt” laws, he advocated allowing in “guest workers” to take jobs that are hard to fill with unemployment so low, particularly to help farmers.
“We’re going to have your guest workers,” he told the crowd. “But then they have to go out.”
It was the most striking example of the dueling visions of America that Mr. Trump toggled between during his rally. Within minutes, Mr. Trump launched into a tirade about the drastic measures he planned if he did not see sufficient progress on his coveted border wall.
“If we don’t get border security, we’ll close down the country,” he said, apparently referring to a government shutdown when a funding deadline is reached in September.
He repeated his attacks on the former F.B.I. officials James B. Comey and Andrew G. McCabe, as well as his own intelligence agencies and the Justice Department. He also criticized those who have questioned his campaign’s contacts with Russia during the 2016 presidential election, acknowledging news reports that a Russian lawyer who met with his son Donald Trump Jr. at Trump Tower was an informant for the Russian government.
“Look at how these politicians have fallen for this junk,” he said, claiming that the reports about the lawyer were part of President Vladimir V. Putin’s efforts to sow discord. “Give me a break.”
His attack on Mr. Tester followed several tweets earlier in the day in which he called on the senator to resign.
“Allegations made by Senator Jon Tester against Admiral/Doctor Ron Jackson are proving false,” Mr. Trump wrote. “The Secret Service is unable to confirm (in fact they deny) any of the phony Democrat charges which have absolutely devastated the wonderful Jackson family. Tester should resign.”
Mr. Tester fired back with a statement noting that Mr. Trump had signed eight of the senator’s bills to make the Department of Veterans Affairs more accountable and responsive to veterans — including one that Mr. Trump would later boast about in his evening speech.
In criticizing Mr. Tester, Mr. Trump ignored Republican resistance to Dr. Jackson’s nomination. Senator Johnny Isakson of Georgia, the Republican chairman of the Committee on Veterans Affairs, supported Mr. Tester in raising questions about the nomination.
Mr. Tester released a list of accusations alleging loose distribution of prescription drugs, a hostile work environment and drunkenness, allegations raised by more than 20 current and former military personnel who had worked with Dr. Jackson.
Dr. Jackson called the allegations false, and the White House sought on Friday to refute one of them, that he “got drunk and wrecked a government vehicle,” as Mr. Tester’s list put it. A search of government databases turned up no incident that matched that description, the White House said.
“Secret Service has just informed me that Senator Jon Tester’s statements on Admiral Jackson are not true,” Mr. Trump wrote on Saturday afternoon, apparently referring to that one episode. “There were no such findings. A horrible thing that we in D.C. must live with, just like phony Russian Collusion. Tester should lose race in Montana. Very dishonest and sick!”