WASHINGTON (AP) — Win or lose in the race for the majority, House Republicans are at risk of plunging into a messy leadership battle after the November election, with the party lacking a clear heir apparent to take the place of House Speaker Paul Ryan.

President Donald Trump has signaled he'd be happy with next-in-line Kevin McCarthy, the majority leader, a longtime ally whom the president calls "My Kevin."

But Trump is also saying kind words about the No. 3 Republican, GOP Whip Steve Scalise, whom he calls the "legend from Louisiana." Scalise survived life-threatening injuries after he was shot at a congressional baseball practice in 2017.

And there's a third lawmaker in the mix: conservative Rep. Jim Jordan of Ohio, who is waging a longshot bid to take the gavel. Trump appeared with Jordan at an Ohio rally in the summer and beamed when the crowd started chanting, "Speaker of the House!"

"There's going to be a contest, for sure," said GOP Rep. Tom Cole of Oklahoma, a veteran of leadership battles who said he's never seen anything like the "high drama" that's about to unfold. "Usually the election settles all the issues. This one won't."

Polls are seesawing in the final weeks before the election, creating suspense about whether Democrats will regain control of the House for the first time since 2010. Yet it's almost certain that the often unruly House GOP contingent will be smaller next year. Republicans hope to hold the majority, but fully expect to lose some seats.

The election is likely to produce a more conservative, pro-Trump Republican lineup in the House, as most of the GOP incumbents at risk of losing hail from moderate-leaning districts and suburbs. Their defeat would probably concentrate more power in the hands of the House Freedom Caucus and its libertarian-leaning allies in rural, traditionally Republican states who doubt McCarthy's conservative bona fides. Those lawmakers blocked the Californian's rise when he first reached for the speaker's gavel three years ago.

Conservatives say the House majority is at risk in large part because Republicans didn't stand fully behind Trump. They fault their own side for failing to repeal "Obamacare," build a wall along the border with Mexico and keep other campaign promises. If there's a GOP wipeout on Election Day, Republicans will probably be eager to boot the current GOP leadership, which could give rise to Scalise or even Jordan's unorthodox bid.

In public, none of the leaders-in-waiting likes to talk about the struggle to come. Their goal, they say, is to keep the House majority. But behind the scenes all three are all dialing up colleagues and racing around the country spending their time — and campaign cash — to salvage the GOP's hold on the House.

"It's going to be close, but I still think we keep the majority," McCarthy told The Associated Press on Wednesday in between campaign stops.

McCarthy, who is traveling to a dozen states for two dozen lawmakers in October and shoveled $24 million in donations to candidates and campaign committees, convened an all-hands-on-deck conference call, urging colleagues to put campaign money into a team effort to protect the majority.

The upbeat mood after that call Wednesday was a turnaround from the gloom of a few weeks ago when polls indicated Democrats were favored to take over the House, with even safe seats in Trump-won districts in Pennsylvania and Iowa at risk. Republicans are sensing an uptick, thanks to Brett Kavanaugh's confirmation to the Supreme Court, and a newly energized electorate awakened to the stakes of the midterm. As McCarthy puts it, "This is an election about jobs versus the mobs."

Scalise technically isn't even running for a promotion — officially, he backs McCarthy for speaker — but he's indicated he would be available to step in if McCarthy falls short.

While boarding a plane after campaigning in Michigan, Scalise said that while the GOP ranks may be smaller and tighter after the election, the outcome "brings everybody closer." He was dashing off to support the GOP candidate in an open seat in South Carolina. Rather than embolden challenges to the leadership, the election could knit the House GOP closer together behind Trump's agenda, he said.

"Everybody needs to be all in," Scalise told AP. "We're not fighting to keep this majority to be at odds with each other. We want to get some things done."

As the majority whip these past few years, he said, "my job has been to build those coalitions."

Perhaps most unusual has been Jordan's longshot bid. Taking a page from Trump's playbook, Jordan has eschewed the normal path, opting for an outside campaign that's drumming up support from conservative groups and media-friendly allies.

Jordan is a regular on Fox News, pushing the House GOP's investigation of the Justice Department's probe into Russian interference in the 2016 election. Alongside Rep. Mark Meadows, R-N.C., the chairman of the Freedom Caucus who is also campaigning for colleagues, he is positioning the group for influence in the House.

None of the top three is without baggage. Jordan faces accusations that he didn't do enough as a young assistant Ohio State University wrestling coach to halt alleged sexual misconduct by the team doctor. Jordan forcefully denies those accusations. Scalise has had to answer questions about his appearance years ago before a community group with ties to former Ku Klux Klan leader David Duke.

To be sure, Democrats have their own struggles. House Minority Leader Nancy Pelosi wants to return as speaker if Democrats win a House majority; many in her party want new leadership.

Republicans have been here before, in a chaotic period after conservatives forced John Boehner into early retirement in 2015, then denied McCarthy the votes to move into the top spot. Ryan was recruited to fill the leadership vacuum.

To shore up his conservative flank, McCarthy has pivoted closer to conservatives and is championing their issues, including legislation to pay for Trump's $25 billion border wall.

If Republicans retain the GOP majority, Cole said he would be hard pressed to see Republicans walking away from McCarthy after all he's doing to keep the party in power.

But if Republicans lose big, especially in the late-breaking California races, McCarthy's clout could diminish. The population of suburban Orange County, a longtime GOP stronghold, is shifting like the rest of the state.

"They said it was impossible for the House Freedom Caucus to oust Boehner," said Noah Wall, a vice president at FreedomWorks, the conservative advocacy group that is rallying for Jordan. "We don't claim there's anything but a longshot, but we see several paths."

___

Follow on Twitter at https://twitter.com/lisamascaro

Copyright 2018 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.