Next month’s midterm elections could shatter three decades of political precedent.

Democrats look poised to retake the House, but Republicans appear likely to retain control of the Senate on Nov. 6.

That would be the first time since 1982 that a midterm election wave ended with such divergent results.

Political experts had to go that far back to find an instance when Democrats posted major wins in the House without scoring significant gains in the Senate.

Like many things in politics these days, President Trump is a driving force in the anomaly.

He boosts Republican chances in the Senate because he’s popular with white voters in rural areas, which is where many of the contested races are.

But he doesn’t help Republicans much in the suburban House races likely to decide control of the lower chamber.

“The personality of the president is playing … an outsized role,” said Monmouth University pollster Patrick Murray.

While Trump’s approval rating has hovered around 40 percent before a recent uptick, he’s been consistently more popular in several dozen battleground races.

Pollsters from Siena College have talked to 35,000 voters around the country since Labor Day and found Trump’s job-performance average as high as 46 percent positive in areas with competitive contests.

In the Senate, Trump’s strength in rural areas is a shield against the Democratic surge.

Ten Democratic senators are battling for re-election in states that Trump won — and in five cases by more than 10 points.

By having to defend so many seats, Democrats are not likely to make gains in a Senate split 51-49 in favor of Republicans.

“I think we’re going to have a status quo Senate,” predicted Jennifer Duffy of the Cook Political Report, a nonpartisan online newsletter.

While Democrats face uphill battles in North Dakota, Indiana and Missouri, Republicans face dogfights trying to hold on to Senate seats in Arizona and Nevada.

“North Dakota, it’s hard to see them win that. Missouri is tough. Indiana’s tough,” Duffy said. “It just has a lot to do with the map.”

The picture for Democrats has worsened in some states because the bruising fight over Supreme Court Justice Brett Kavanaugh helped energize previously dispirited Republican voters, polling shows.

Trump’s clout doesn’t extend to suburban House districts once dominated by the GOP.

“It’s all about motivating the base and not about swinging undecided voters,” said Murray, the Monmouth pollster.

“We know from our polling that both bases are energized at levels that we haven’t seen in midterm elections.”

The website FiveThirtyEight, run by statistician Nate Silver, pegs the odds of Democrats retaking the House at 80 percent. According to Silver’s simulations, Democrats will likely pick up 35 seats, which would give them a 230-205 majority.

Polling aggregator RealClearPolitics shows that of the 31 toss-up seats in the House, 29 are held by Republicans.

Additionally, another 14 Republican seats are either leaning or likely to go Democratic. Just two Democratic seats are considered leaning GOP or likely to flip.

“There are a couple [of dozen] to a few dozen races that are within a few points,” pointed out Nathan Gonzales, editor of election tracker Inside Elections.

The battlegrounds in the House largely center on suburban communities near major East and West Coast cities — like Philadelphia, Washington, DC, and Los Angeles — and Midwestern communities where Trump did surprisingly well in 2016.

In the suburban districts, Democratic challenges to Republican incumbents are being powered by an overwhelming advantage with college-educated women voters.

A recent NBC News/Wall Street Journal poll showed that Democrats lead among white women with college degrees by 33 points nationally, 61 percent to 28 percent.

“We’re seeing that educated white women have the highest level of enthusiasm,” said Don Levy, the director of the Siena poll.

The gender divide is even evident in one tightly contested race well north of the traditional big-city suburbs in New York.

In the 21st Congressional District, which includes much of the Hudson Valley, Democratic challenger Antonio Delgado has a 17-point lead among women, while Republican incumbent John Faso has a 19-point lead among men, according to Siena’s most recent poll.

The gender split means that the race is neck-and-neck. Faso leads by just 1 percentage point, 44 percent to 43 percent.

“It is now seemingly relatively commonplace that they may be battling as to whether they watch MSNBC or Fox,” Levy joked. “Men are far more likely to support the Republican, and women are far more likely to support the Democrat.”

Meanwhile, this midterm election is set to become the most expensive in history — as an estimated $5 billion will pour into campaigns, political committees and other groups before it’s all said and done, the Center for Responsive Politics projects.

That’s up from $3.6 billion in 2010 and $3.8 billion in 2014.

“We’ve never seen an increase of a billion before,” said Sarah Bryner, research director for the Center for Responsive Politics.