WASHINGTON — Republicans retained Senate control Tuesday after ousting Democratic incumbents in Indiana, North Dakota, and Missouri, delivering a victory to President Trump by preserving the chamber as a showplace for his conservative priorities for two more years.
To seal the win, the GOP drew backing from hard-right voters in rural, deep-red states, where Trump’s nativist, racially tinged rhetoric and insult-laden discourse were as stirring for some conservatives as they were infuriating to liberals elsewhere.
Four races are still up in the air — Arizona, Florida, Montana, and Mississippi.
‘‘Donald Trump went out and worked his tail off,’’ Senator Cory Gardner of Colorado, who heads the Senate GOP’s campaign committee, said in an interview. He cited Trump rallies that drew thousands in crucial states during the campaign’s closing weeks and added, ‘‘The president was THE factor.’’
The significance of the Republican victory in the Senate, which the party has dominated for the past four years, was magnified because Democrats wrested House control from the GOP. That’s a sure-fire formula for two years of legislative gridlock and positioning for the 2020 presidential and congressional elections.
Senator Dean Heller of Nevada, the only GOP incumbent seeking reelection in a state Democratic presidential candidate Hillary Clinton won in 2016, became the only Republican senator to lose. First-term Representative Jacky Rosen ousted him, attacking him for backing last year’s Republican effort to repeal President Obama’s health care law.
Republicans retained Senate seats in the South, Midwest, and West and ensured at least a 51-49 majority, equal to their current margin. With three races unresolved early Wednesday, Republicans stood a chance of expanding their majority with wins possible in Florida, Arizona, and Montana.
They paved their path to victory by defeating Democrats Joe Donnelly of Indiana, Heidi Heitkamp of North Dakota, and Claire McCaskill of Missouri. They kept competitive seats in Texas, where Ted Cruz fended off Representative Beto O’Rourke, the well-financed liberal darling, and Tennessee, where Representative Marsha Blackburn prevailed.
Trump called the Senate majority leader, Mitch McConnell, ‘‘to congratulate him on the historic Senate gains,’’ White House spokeswoman Sarah Sanders said. It was just the second midterm election in over three decades when the party holding the White House gained seats.
The Republican Senate win was especially significant because that chamber confirms nominations, including for Supreme Court justices and federal judges, a top GOP priority.
The party’s agenda includes tax and spending cuts, trade, immigration restrictions and curbs on Obama’s health care law. Short of compromises, perhaps on infrastructure, its initiatives will go nowhere in the House.
Even passing many bills will be difficult for the Senate. The GOP will fall short of the 60 votes needed to break Democratic filibusters, procedural delays that kill legislation.
Although Republicans entered the night commanding the Senate only narrowly, a crucial piece of math worked for them: Democrats and their two independent allies defended 26 seats, Republicans just nine.
‘‘Senate Democrats faced the most difficult political map in 60 years,’’ said Senator Chris Van Hollen of Maryland, chairman of Senate Democrats’ political arm. He lauded his party for winning at least half the 10 seats they were defending in states Trump carried and preventing Republicans from capturing a filibuster-proof majority.
Blackburn, a conservative and ardent Trump backer, defeated former Tennessee governor Phil Bredesen, 74. Bredesen had promised a bipartisan approach if elected.
Heitkamp lost to Representative Kevin Cramer, whom Trump persuaded to seek the Senate seat. McCaskill was denied a third term by Josh Hawley, 38, Missouri’s hard-right attorney general, who called McCaskill too liberal for the state.
Senator Joe Manchin, a Democrat, was reelected in West Virginia, which Trump captured by 42 percentage points. Democratic incumbents prevailed in Ohio, Pennsylvania, Michigan, and Wisconsin, which Trump carried narrowly.
Democrats hoped their supporters’ would surge to the polls. Fueling their intensity were Trump’s anti-immigration stances, his efforts to dismantle health care protections enacted under Obama and the #MeToo movement’s fury over sexual harassment.
‘‘Ever since President Trump has been in office, it has just been not the country that I am used to or that I thought I would be in,’’ said Sarah Roth, 22, a Democratic voter from Minnetonka, Minn. ‘‘And so this really was my opportunity to help this country in changing who is making the decisions.’’
AP VoteCast, a national survey of the electorate conducted by AP, highlighted Trump’s impact. Nearly 4 in 10 said they were casting ballots to express opposition to him, while just 1 in 4 said their vote was an expression of support.
‘‘I believe he values immigration, but he wants to make sure we’re safe,’’ said Tina Newby of Wetland, Mich., a GOP voter. ‘‘I like the fact that he is not a politician, and I forgive some of the socially incorrect or politically incorrect things that he says.’’
Senator Bernie Sanders, Independent of Vermont, and Democrats Elizabeth Warren of Massachusetts; Kirsten Gillibrand of New York; and Minnesota’s Amy Klobuchar were easily reelected. All three and Sherrod Brown, a pro-labor senator victorious in Ohio, are considered potential 2020 Democratic presidential contenders.
Bob Menendez, a Democrat, won a third Senate term in New Jersey, despite a federal bribery indictment that prosecutors dropped this year after a mistrial. Also victorious was Republican Mitt Romney, the vanquished 2012 GOP presidential candidate who grabbed an open Utah seat.