House Majority Leader Eric Cantor walks into a meeting in this file photo. Cantor’s primary opponent, tea party activist David Brat, is gaining attention as a possible threat to Cantor’s House seat. (Sarah L. Voisin/The Washington Post)

There was a time when House Majority Leader Eric Cantor (R-Va.) sympathized with the tea party’s frustration with Washington.

Now, he’s engaged in open warfare with the GOP’s insurgent wing.

This week, Cantor’s opponent in the June 10 primary — a tea party activist named David Brat — is gaining national attention as a potential threat to Cantor’s hold on his solidly Republican, suburban Richmond district. Brat has won support from some big-name conservatives and has tapped into discontent across Virginia’s 7th Congressional District. On Wednesday, Brat planned to travel to Washington to meet with leading conservative agitators, a sign that his effort is starting to be taken seriously at the national level.

The intraparty drama is the latest reflection of the deepening chasm in the Republican Party across Virginia and the nation. And it is all the more remarkable because it is happening to a man widely seen as the likely next speaker of the House.

Most Republicans continue to believe Cantor is safe; he won a primary challenge two years ago with nearly 80 percent of the vote. But the prospect of a competitive and bruising challenge to the second-ranking Republican in Congress is embarrassing to Cantor — and is rattling GOP leaders at a time when the party is trying to unify its divided ranks.

“The conservatives are becoming more vocal,” said Thomas J. Bliley Jr., Cantor’s political mentor and predecessor in the House. “Once I was elected back in 1980, I didn’t have a primary fight for the 20 years I was there, and this is the first time Eric has had a serious or semi-serious primary opponent. You have people who are frankly disgusted with Washington, and he is a visible symbol.”

A key moment came last weekend. Speaking Saturday to Republican activists gathered in a Hilton ballroom outside Richmond, Cantor tried to reason with conservatives who have embraced Brat.

“It’s easy to say that you’re going to stand up to Obama and the left-wing attack machine, but it is an entirely different thing to actually do it,” a combative Cantor said, “to actually do it, to stand up and be counted.”

The tea partyers weren’t buying it. They booed Cantor, cheered for Brat and even ousted Cantor’s right-hand man as 7th District Republican Committee chairman in favor of one of their own.

Brat, an economics professor at Randolph-Macon College in Ashland, has positioned himself to the right of Cantor, charging that the majority leader’s national profile and association with the GOP political class have hurt him. Brat also accuses Cantor of supporting amnesty for people who came to this country illegally — a charge Cantor denies — and criticizes the incumbent for allowing an increase in the debt ceiling and voting for a budget that didn’t defund the Affordable Care Act.

Cantor was an architect of the GOP’s strategy to use the 2011 vote to raise the debt ceiling to wrest spending concessions from Democrats. Still, Congress has allowed the debt ceiling to rise repeatedly since that showdown, angering many conservatives. Cantor has argued repeatedly to repeal the health-care law.

View Graphic Election Lab: See our current forecast for every congressional race in 2014

Brat remains a long shot; according to first-quarter federal filings, his campaign had about $40,000 in the bank, while Cantor’s had $2 million.

But Brat has won the favor of national conservative heroes Ann Coulter and syndicated talk-radio host Mark Levin. And on Wednesday, he was scheduled to attend a breakfast in Washington hosted by the anti-tax activist Grover Norquist and a lunch with conservative operatives.

Zachary Werrell, Brat’s campaign manager, said the candidate has enjoyed a significant boost in fundraising since the weekend convention and now has twice as much cash on hand as in the last filing period.

“It’s getting exciting — and I’m not BS-ing you,” Brat said in an interview this week. “This district is conservative and idiosyncratic, and they’re not overwhelmed by the establishment and their millions. It’s David vs. Rome.”

Cantor appears to have no trouble playing the role of Goliath.

He began blanketing Fox News with ads after Brat announced his candidacy. In one, Cantor calls Brat, who once worked on a state board of economists, an ally of Sen. Timothy M. Kaine (D-Va.) when Kaine was governor. “Liberal college professor, Tim Kaine adviser, Republican?” a narrator asks. “You’ve got to be kidding.”

And at the party district committee meeting Saturday, Cantor came out swinging, accusing Brat of “inaccuracies.”

The offensive may have backfired, at least among the activists at the Hilton, who numbered about 1,200 and opposed Cantor’s choice for district chairman by a small margin.

“I’m a rookie, he’s never gone negative, and he’s putting my face and name on Fox News, which is unheard of,” Brat said after the meeting Saturday. “If they’re doing that, that means their internal polling shows that I’m not at zero. I’m a risk of some sort.”

Cantor’s people deny that Brat is a threat, and they note that the majority leader has advertised on TV in every election since his first, in 2000.

“There were 600 people there to raise Cain,” Cantor strategist Ray Allen said of Saturday’s convention. “We had 48,000 voters in the primary two years ago. It’s just a very quantum-leap different thing. They’re a small group, and they were very loud.”

Some Republican officials blame another stealthy insurgency for the GOP’s disastrous showing in last year’s statewide elections, when Democrats swept contests for governor, lieutenant governor and attorney general after portraying the Republican ticket as too extreme for Virginia.

Leading up to those defeats, a coalition led by gubernatorial contender Ken Cuccinelli II seized control of the Republican State Central Committee and determined the party would hold a convention — a two-day affair attended mostly by activist voters — instead of state-run primary elections, which are open to all registered voters.

A hero among tea partyers for his stances against the Affordable Care Act, federal environmental policies and gay marriage, Cuccinelli was so assured of winning at the convention that his ­establishment-backed opponent dropped out before it happened.

Heading off a similar effort this year is a new role for Cantor, who since his days in the Virginia legislature has positioned himself as a pro-business, establishment Republican but who began to forge ties with the tea party in 2010, when the movement gained momentum and swept Republicans into power in the House.

Tea party activists in Cantor’s district never bought it. And this year, they braced for battle when he began pouring money and resources into the internal process of choosing a district chairman. Losing all three statewide offices in 2013 hasn’t been enough to unite the party.

“What mature parties do, they sit together and work things out,” said Thomas M. Davis III, a former Republican congressman from Northern Virginia. “We’re not there yet. I don’t think we’ve been beaten bad enough to understand what it takes to work together.”

Some Republicans believe the results of the internal party vote for 7th District chairman was a warning sign for Cantor, who lost the vote even after pulling out the stops on behalf of longtime incumbent chairman Linwood Cobb.

Cantor’s associates churned out mailers to support Cobb, a friend since he and Cantor met at a local Rotary Club meeting in 1992. Cantor’s camp paid $3 apiece in postage to send personalized trinkets to party loyalists. And on convention day, the committee bought up all the Short Pump Hilton’s conference rooms to stymie Brat and provided day care for the kids of Cobb supporters. Cantor hosted a breakfast.

In the end, Fred Gruber defeated Cobb, 52 percent to 48 percent.

“This is a man and his team that’s had a mission of removing conservatives within his own district,” said Jamie Radtke, a tea party leader and former U.S. Senate candidate. “It was a sweet victory.”

Despite the vocal tea party minority, Bliley stressed that Cantor will be safe. Democrats, he noted, aren’t even in the game.

“This is still the most Republican district in the state, from the west end of Richmond to Culpeper,” Bliley said, “and once he gets through this, the Democrats don’t have a candidate — no one filed.”