House Republicans on Wednesday plunged into a regional and ideological struggle over the prospect of new leadership, with a flash campaign for top jobs that will echo the internal battles that have roiled the national GOP for the past five years.

Rep. Eric Cantor (R-Va.) announced Wednesday that he was stepping down from his role as majority leader after an embarrassing primary defeat Tuesday night. His statement prompted GOP lawmakers of various ideological stripes to launch bids to succeed the onetime rising star, who had become the heir apparent to House Speaker John A. Boehner (R-Ohio).

From phone calls to text messages to e-mails to secret meetings, fault lines quickly developed inside an already fractured caucus that has grown increasingly conservative since the 2010 elections swept Republicans into control of the House.

After an emotional meeting with GOP lawmakers, Cantor threw his “full support” behind his longtime lieutenant, Majority Whip Kevin McCarthy (R-Calif.), a genial 49-year-old with close ties to many members of the huge 2010 class. A strong fundraiser, McCarthy represents the conservative establishment within the party.

Immediately, he faced a threat from a pair of conservative Texas chairmen — Reps. Jeb Hensarling, head of the Financial Services Committee, and Pete Sessions, head of the Rules Committee. A onetime member of ­leadership, Hensarling has emerged as the choice of conservatives who have cheered his battles with Boehner and Cantor over issues such as flood insurance laws and reauthorization of the ­Export-Import Bank.

After losing his primary to tea party challenger David Brat, House Majority Leader Eric Cantor (R-Va.) announced he will be stepping down from House leadership at the end of July. (Associated Press)

Should McCarthy win, a similar battle is set to play out to fill his No. 3 slot in leadership.

That battle is likely to carry regional overtones, pitting Southern members against those from the Midwest.

Hoping to avoid a long and potentially divisive campaign period, Boehner’s leadership team scheduled a relatively speedy race, with secret ballots to be cast June 19, giving contestants only eight days to make their cases against each other, even though Cantor intends to stay on as majority leader through the end of July.

During Wednesday’s meeting, Boehner warned rank-and-file members that they should not let the coming fight rip them apart or squander the political advantages he saw building in their favor as a result of various stumbles by the Obama administration.

“This is the time for unity, the time for focus — focus on the thing we all know to be true: the failure of Barack Obama’s policies and our obligation to show the American people we offer them not just a viable alternative but a better future,” Boehner said in the closed-door meeting, according to remarks distributed afterward by his aides.

With his own future under much scrutiny, Boehner told some allies Wednesday that he was inclined to seek another term instead of retiring at the end of the year, according to two House Republicans who discussed the issue with the speaker.

The forces at play in the Cantor defeat represented the same ones that have been at the heart of the battle for the GOP’s ideological soul since George W. Bush exited the White House in January 2009. An establishment favorite, Cantor was one of his party’s top fundraisers, with deep ties to Wall Street and Silicon Valley. His primary opponent, college professor Dave Brat, ran a shoestring campaign as a conservative populist, against immigration legislation and against big banks.

Brat’s views represent those of up to a third of the 233 House Republicans, many of whom have caused a lot of complications for Boehner and Cantor since 2011, when the GOP took control of the House. The question ahead is whether enough Republicans want to push in that direction in their leadership races as well as the legislative agenda. But those races can be tricky affairs in which personal relationships sometimes trump ideological differences.

Conservatives, long suspicious of a leadership team dominated by five lawmakers from states President Obama won twice, are adamant that this is their opportunity to plant someone they consider more ideologically aligned with them in at least one of the top three slots. Southerners, who had a stranglehold on top GOP leadership posts in the 1990s, are also trying to solidify ranks to ensure they get a prime seat at the table.

“I just think that there is a geographical area of the country that has not been represented in leadership, and I think that could be the determining factor in what happens,” said Rep. Lynn A. Westmoreland (R-Ga.).

McCarthy enters the race with a head start — he has been preparing for it for some time, given the long-running speculation that Boehner would retire and Cantor would become speaker. McCarthy waited for Cantor to announce his decision Wednesday and then went to work, deploying the capabilities of his extensive whip staff, according to several insiders familiar with his thinking.

A year ago, the Californian was reeling from a series of failed votes and questions about his ability to persuade wavering colleagues to vote with the leadership. But several top aides to rank-and-file Republicans said McCarthy is the most personable of any member of the leadership team, the person always checking in on children’s birthdays or illnesses.

In addition, he loves political travel, and throughout the spring he did events with many colleagues across the country, including a swing through noncompetitive districts in the South.

Hensarling is the most ideologically troubling opponent for McCarthy, with outside conservative groups already publicly calling for him to succeed Cantor — and then Boehner.

Hensarling was seen huddling on the House floor Wednesday afternoon alongside House Budget Committee Chairman Paul Ryan (R-Wis.) and Rep. Tom Price (R-Ga.), a key conservative broker. Earlier, he had huddled with Reps. Mick Mulvaney (R-S.C.), Justin Amash (R-Mich.) and Raúl Labrador (R-Idaho), a trio of Republicans who rarely back leadership.

In a brief interview, Hensarling was coy, saying that he was still mulling a potential leadership run. But he was upbeat and smiling, somewhat unusual for the taciturn Republican.

The conservative purists who helped spur Brat to victory over Cantor began an agitation campaign against McCarthy.

“Apparently the leadership isn’t getting the message,” said Mark Levin, who along with talk-show host Laura Ingraham was a notable backer of Brat’s campaign. “We want a constitutional conservative in the leadership, not just the next guy in line.”

Sessions began texting colleagues Tuesday night asking to speak with them about his bid for majority leader. His top advisers were actively positioning him for the race.

Sessions argued that his work during the 2010 elections as chairman of the National Republican Congressional Committee makes him ready to manage the House floor.

“I’ll be a majority leader who will be clear-headed about what we’re going to try to accomplish, putting more focus on what we’re trying to sell,” Sessions said, adding that he has a “strong and open” relationship with Boehner. “I know how to win.”

The large Texas Republican delegation, which represents 10 percent of the House Republican Conference, met late Wednesday but did not produce a unified front for Sessions or Hensarling. Sessions’s greatest liability is that, despite his conservative Texas roots, he is seen as a Boehner loyalist in a conference that could hesitate to give the speaker that much clout at the top.

A race between McCarthy and Sessions would revive a simmering rivalry. Sessions wanted to be whip after the 2010 elections, but McCarthy outmaneuvered his older opponent. Ever since, Sessions, 59, has been eager to challenge McCarthy and is telling colleagues that an older, more conservative hand is needed near the top, aides said.

If McCarthy does climb the leadership ranks, the race to succeed him as whip will become a last stand for conservatives.

Rep. Peter Roskam (R-Ill.), the chief deputy whip and a close friend of McCarthy’s since they arrived in Congress together in 2007, announced to his inner circle Wednesday that he will run for whip, the third-highest position in leadership.

But Roskam is expected to face stiff competition from Rep. Steve Scalise (R-La.), who leads the conservative Republican Study Committee and is already privately trying to build support among his colleagues, according to aides familiar the jockeying.

In his conversations with colleagues, Scalise is making the case that he would serve as “a red-state voice” in leadership ranks lacking a hard-line conservative.

But Rep. Patrick J. Tiberi, an Ohio Republican close to Boehner, pushed back on suggestions that the next leader needs to be from the South.

“Where does it say that in the Constitution?” he quipped to reporters.

After receiving several standing ovations from his colleagues inside the Capitol basement meeting room, Cantor told reporters that he remains hopeful that the coming leadership votes will not split the party ahead of what could be a solid showing in the November election.

“Truly, what divides Republicans pales in comparison to what divides us as conservatives from the left and their Democratic Party,” he said. “I hope that all Republicans will put minor differences aside and help elect a Republican House and Senate.”

Chris Cillizza, Tom Hamburger, Wesley Lowery, Jackie Kucinich and Sean Sullivan contributed to this report.