President Trump addressed a crowd at a rally in Billings, Montana Thursday night in support of GOP congressional candidate Matt Rosendale in his quest to unseat Democratic Sen. John Tester.

Trump kicked off the rally touting the work his administration has done and briefly mentioned the ongoing Senate confirmation hearings for Supreme Court nominee Brett Kavanaugh. Describing Kavanaugh as "truly exceptional," Trump said he thought the nominee was "doing really well."

Separately, likely referring to Democrats on the committee, he said it was "embarrassing to watch those people make fools of themselves as they scream and shout at this great gentleman."

The president also referenced a controversial op-ed with The New York Times -- written by an anonymous "senior official in the Trump administration" -- and urged the publication to release the author's name "for the sake of our national security."

The president's trip to Montana came one day after the op-ed's publishing, in which the official revealed "that many of the senior officials in his own administration are working diligently from within to frustrate parts of his agenda and his worst inclinations."

The president also made reference at the rally to allegations released earlier this year by Tester regarding Trump's pick to head the Department of Veteran Affairs, White House physician Ronny Jackson.

trump montana july

President Donald Trump, seen on July 5, looks to GOP Senate candidate Matt Rosendale during a rally in Great Falls, Montana. (AP Photo/Carolyn Kaster, File)

Trump said Jackson "was subjected to horrible lies and smears."

"What Tester did to Admiral Jackson should never, ever be allowed," Trump said.

Jackson ultimately withdrew his nomination to lead the department amid allegations collected by Tester’s office about his prescription-drug practices and use of alcohol.

Trump slammed Tester, accusing him of saying things to his constituents in Montana and then acting differently in Washington D.C., adding that "he votes like he's Nancy Pelosi."

The president painted Democrats as weak on immigration, emphasizing the need, he said, to vote for Rosendale over Tester.

"This election is a choice between Democrats who want to abolish ICE and Republicans who want to abolish MS-13," Trump said.

Closing out the rally, Trump urged people in Montana to gather their friends and family in November and "get out and vote Republican."

Rosendale and Tester are facing off in a state Trump claimed victory in during the 2016 presidential election, winning by 20 percentage points.

When Trump visited Montana in July, Tester took out full-page ads in several newspapers welcoming the president to the state. Trump proceeded to slam Tester at a rally in Great Falls as an obstructionist who was out of touch with the state's voters.

Tester, who on Wednesday revealed a new TV ad touting his work with Trump concerning veterans, told The Associated Press Thursday that its never “a bad thing” when a president visits Montana.

“Anytime you get a president of the United States to come to Montana, it's certainly not a bad thing for Montana,” Tester said. “He's going to do what he's going to do. I just hope he uses the trip for more than political purposes, but we'll see.”

Rosendale dismissed the idea of his opponent and Trump working together as being "rather amusing."

“Jon has opposed the president and he's trying to come back here and say he's supporting the president,” Rosendale told The Associated Press. “The president, who Jon says he's working so well with, is going to say, ‘Jon isn't working with me.’”

Fox News’ Joseph Weber and The Associated Press contributed to this report.