HUNTINGTON, W.Va — President Trump acknowledged at a campaign rally Friday that Republicans could lose control of the House of Representatives, as the GOP faces an uphill battle in keeping the chamber even as the party is positioned to hang onto the Senate majority.

But even if Republicans are swept out of power in the House, Trump seemed unconcerned about the implications, telling a crowd gathered at an airport hangar here: “I’ll just figure it out.”

If Democrats take control, “they will try to erase our gains and eradicate our progress. That’s what’s going to happen,” Trump said at a rally to boost GOP Senate candidate Patrick Morrisey and House hopeful Carol Miller. “It’ll be bad for the country, the Democrats. And it could happen. Could happen.”

He continued: “We’re doing very well, and we’re doing really well in the Senate, but could happen. And you know what you do? My whole life — you know what I say? Don’t worry about it. I’ll just figure it out.”

Trump traveled Friday night to Indianapolis, where he and Vice President Pence held a rally for Republican Senate nominee Mike Braun. Trump continued to hammer his closing argument, centered around immigration, casting Democrats as wanting to turn America into a sanctuary for “illegal aliens” and “violent predators.”

“The Democrats want to invite caravan after caravan, and you see we have more caravans forming,” Trump told the Indianapolis crowd. “You do see that. Gee, I wonder how that happens? I wonder how? I think they overplayed their hands on this one, folks, because between Justice Kavanaugh and the caravans, you people are energized!”

Trump repeatedly pummeled Sen. Joe Donnelly (D-Ind.), calling him ineffective and using the nickname “Sleepin’ Joe.” Noting that Donnelly plans to campaign this weekend with former president Barack Obama, Trump highlighted the middle name of his predecessor, calling him “Barack H. Obama” and writing out the “H” with his finger in the air.

Earlier, the president arrived in West Virginia on Friday afternoon amid signs that Sen. Joe Manchin III (D-W.Va.) maintains a strong chance of retaining his seat despite running in the most pro-Trump state in 2016.

A leading Republican super PAC has retreated from the airwaves in West Virginia, after spending millions in recent months. The Senate Leadership Fund is no longer airing television advertisements in the race, instead making more modest investments in get-out-the-vote efforts and digital advertising.

During the Huntington rally, which ran just under an hour, Trump criticized Manchin for waiting until all Senate Republicans had announced how they would vote on the nomination of Brett M. Kavanaugh to the Supreme Court to reveal his position.

Trump recounted a phone call he had with Manchin just a few days before the final confirmation vote, when the president urged him to come out in favor of Kavanaugh: “Joe, I need the vote, like, today.”

Manchin did ultimately support Kavanaugh, but he announced his backing “one-eighth of one second” — according to Trump’s retelling — after Sen. Susan Collins (R-Maine) had announced her support and the GOP had locked down 50 votes. Trump nonetheless added some praise of Manchin in his remarks, telling his supporters: “There’s nobody smoother than Joe, you gotta understand.”

Trump effusively praised Morrisey, the state’s attorney general, saying that “he’ll always vote for us. Not for me. For us.” Morrisey earlier had said he would be a “strong conservative fighter for President Trump” in the Senate. If Morrisey votes against Trump or his initiatives, Trump told the crowd: “We’re going to impeach him.”

Morrisey has used his alliance with Trump as a major selling point to voters as he works to oust Manchin. But the Democrat’s long history of getting elected statewide — he is a former governor who has served in the Senate since 2010 — and his record of supporting Trump on key issues, such as the environment and his Supreme Court picks, have complicated their task.

Trump won more than 68 percent of the vote here, his largest share in any state. Many of Trump’s most ardent supporters, though, cited his endorsement of Morrisey as a big factor in their decisions, saying they may have liked Manchin in the past but could no longer count on him.

“The thing that swayed me is Trump,” said Rick Kirk, 61, who said he switched his registration from Democrat to Republican three years ago. “I don’t think Manchin is a bad person — and I do think he has West Virginia values — but I want someone who is going to support Trump.”

Casey Talbert, 30, said she voted for Machin when he ran in 2012 but is supporting Morrisey because “we need people who are going to support President Trump’s agenda.”

Talbert said she was glad that Manchin was the sole Democrat to vote for Kavanaugh but that it didn’t persuade her to vote for him.

Samantha Ray, 48, described Manchin’s vote on Kavanaugh as “grasping at straws” in an attempt to win support from Republicans who overwhelmingly favored his confirmation.

Ray, of Huntington, said Manchin “used to be a good guy, but has gone from one side of the fence to the other too often.”

Miller, who is running in a surprisingly close congressional race against Democrat Richard Ojeda, praised Trump and sharply criticized her opponent, whom the crowd loudly booed.

“Every time my opponent opens his mouth I am disgusted,” Miller said of Ojeda, whom Trump has called a “wacko” and “stone-cold crazy.” Ojeda, who voted for Trump in 2016, initially responded by embracing the label, releasing a video in which he said, “If I’m crazy . . . because it’s hard for me to sleep at night knowing that we got kids who go to bed hungry, then I’ll be crazy wacky.”

Kim reported from Washington. Philip Rucker contributed from Indianapolis.