FARGO, N.D. — President Donald Trump said Friday that the ongoing investigation into Russian interference in the 2016 presidential is not only bad for the country, “it’s really unfair for our midterms.”

Trump also said special counsel Robert Mueller should have wrapped up the inquiry a “long time ago.”

Asked about the investigation, which he has repeatedly denounced as a “witch hunt,” Trump reiterated to reporters that there was no collusion between anyone one his presidential campaign and the Russian government.

But he said the time had long past for the investigation to have ended.

“We have to get it over with. It’s really bad for the country. It’s really unfair for our midterms. Really, really unfair for the midterms,” Trump said. “This thing should have been over with a long time ago.”

The president addressed reporters in the midst of a two-day campaign swing through states where Republicans hope to expand their narrow 51-49 majority in the Senate by knocking off vulnerable Democrats from Montana and North Dakota.

Trump was flying from Billings, Montana to Fargo, North Dakota, for fundraising events when he visited the press cabin aboard Air Force to address reporters accompanying him on the trip, part of an intense schedule of campaigning that Trump plans through the Nov. 6 elections.

Asked if he would consider allowing a government shutdown before the November elections, Trump said, “I would do it because I think it’s a great political issue.” But he said some Republican lawmakers would “rather not do it because they have races, they’re doing well, they’re up.”

The president told Fox News in an interview broadcast earlier Friday that a government shutdown “is up to me, but I don’t want to do anything that’s going to hurt us or potentially hurt us because I have a feeling that the Republicans are going to do very well.”

At a rally Thursday in Billings, Montana, Trump urged the defeat of Democratic Sen. Jon Tester, a top GOP target in the fall elections. He is expected to do the same against Democratic Sen. Heidi Heitkamp of North Dakota during Friday’s appearance in Fargo.

As he stood alongside Tester’s opponent, state Auditor Matt Rosendale, Trump said Tester “will never drain the swamp because he happens to live in the swamp.” He also criticized Tester for voting against Republican tax cuts.

Trump praised Judge Brett Kavanaugh’s progress toward confirmation to the Supreme Court but decried the “anger and the meanness on the other side” and the Democrats’ “sick” behavior as he sought to turn Kavanaugh’s confirmation into a political litmus test for voters.

“It’s embarrassing to watch those people make fools of themselves as they scream and shout at this great gentleman,” Trump said.

The president’s strategy on the Supreme Court nomination aims to turn the screws on Tester and Heitkamp. Both red-state Democrats find themselves caught between their Senate leaders and their states’ more conservative voters, who are more broadly supportive of Trump’s pick.

Neither senator has laid down clear markers on how they will vote on Kavanaugh’s nomination, which Senate Republican leaders hope to bring to a floor vote later this month — just weeks before the election.

White House officials contend the Supreme Court was a powerful motivator for Republican base voters in 2016, when Trump won the White House, and they’re seeking to capitalize on Kavanaugh’s nomination to help overcome an enthusiasm gap with Democrats. Likewise, a vote for Kavanaugh by either Tester or Heitkamp could frustrate a Democratic base eager for a more confrontational approach to the Trump administration.

Democrats question whether the Kavanaugh vote will resonate in the race to unseat Tester. He has emphasized his independence and willingness to cross the aisle to work with Trump, who carried Montana by 20 percentage points two years ago.

Likewise, Heitkamp is locked in a tough re-election fight in heavily Republican North Dakota, where she narrowly won six years ago and now faces a more formidable opponent in Rep. Kevin Cramer. Cramer has been a fervent supporter of Trump, who remains popular in North Dakota.

Superville reported from Washington. Associated Press writers James MacPherson in Bismarck, North Dakota; Matthew Brown in Billings, Montana; and Catherine Lucey and Zeke Miller in Washington contributed to this report.