Rep. Dave Brat (R-Va.) in July. Brat defeated then-House Majority Leader Eric Cantor in 2014. (J. Scott Applewhite/AP)

Rep. Dave Brat (R-Va.) is perhaps best known for earning his seat in Congress in 2014 by defeating then-House Majority Leader Eric Cantor.

What some may have forgotten is that the stunning upset came not long after Cantor uttered these words in a 2013 speech about the KIDS Act, legislation he had introduced to provide legal status for undocumented immigrants: “We ought to have the compassion to say these kids shouldn’t be kids without a country.”

President Trump, meet Eric Cantor. “They have been in our country for many years through no fault of their own — brought in by parents at young age,” the president tweeted Thursday morning. He was trying to explain his effort to seek a deal with Senate Minority Leader Charles E. Schumer (D-N.Y.) and House Minority Leader Nancy Pelosi (D-Calif.) over the legislative framework to protect about 700,000 people benefiting from the Deferred Action for Childhood Arrivals, an executive action President Obama took in 2012 to grant these individuals legal status.

Trump, still on Twitter, touted these immigrants as “good, educated and accomplished young people.”

After running a nativist presidential campaign anchored around a pledge to build a wall along the Mexican border, Trump is now touting a position that is squarely in line with what establishment Republicans have been pushing for several years — allowing the most sympathetic among undocumented immigrants to receive at least permanent legal status.

But don’t expect a clear reaction from the right wing of the GOP — nor a clean picture of whether this helps or hurts the disrupter in chief.

Brat, for instance, was flummoxed by Trump’s move. He had blasted Cantor’s plan as a version of amnesty. Co-sponsored by Rep. Bob Goodlatte (R-Va.), the Judiciary Committee chairman, the legislation had proposed granting legal status but not full citizenship. Trump’s initial comments suggested that he would back at least that much. But on Thursday, Brat said he needed to know more.

Was Trump advocating “amnesty”?

Brat paused for four seconds, then started to talk, then stopped, then started again. “There’s no good answer I can give you to what they’ve been talking about,” he said, requesting to know more details. “You’d have to give me — what is it? — before I elaborate.”

But the president’s moves confounded many other Republicans, with few sure what his final position might be and many uneasy about disagreeing with Trump or crossing an electorate that has remained steadfastly loyal through his first eight months in office.

Throughout a hectic day, Trump went back and forth about what he would demand before finalizing a deal with Schumer and Pelosi. At times, his aides agreed with Pelosi’s assertion that DACA beneficiaries would have a path to full citizenship, but then Trump told White House reporters traveling with him to Florida that he supported only legal status.

And back in Washington, the president told reporters that he would not agree to a deal unless it included “very heavy security at the border.”

Either way, Trump embraced the central tenet of a policy proposal that Cantor’s opponent dubbed “amnesty” back in 2014: some form of permanent, legal status for “dreamers.” That position by Cantor galvanized some of the activists who would go on to become Trump’s most outspoken supporters.

Once Cantor lost, talks on a broader bipartisan immigration bill imploded as Republicans retreated out of fear of facing a similar conservative backlash in their own primaries.

The question now is whether Trump — who until now has retained a deep reservoir of support among conservatives — can actually be enough of a salesman to douse the flames of what has been the most divisive domestic policy issue for Republicans over the past decade.

House Speaker Paul D. Ryan (R-Wis.), whose immigration views have hewed close to establishment Republican orthodoxy, believes that Trump is so popular among conservatives that his support would galvanize the votes needed to pass legislation.

“Our members support President Trump,” Ryan told reporters Thursday at his weekly news conference.

The issue is so contentious that, as he locked up enough votes to claim the gavel two years ago, Ryan made a private pledge to conservatives that he would allow a vote on a comprehensive immigration bill only if it attracted majority support within the Republican caucus.

Ever since then, only conservative immigration legislation has advanced — including a bill Thursday that would allow a crackdown on undocumented immigrants suspected of being in criminal gangs.

Rank-and-file Republicans fell all over the map on what Trump was doing.

Rep. Bill Flores (R-Texas), who last year chaired the Republican Study Committee, a conservative caucus, suggested that he could support a deal combining tough border security and enshrining DACA into law. Flores does not mind that Trump is willing to punt on funding for a border wall in some future negotiation. “We can always come back and revisit the wall later,” he told The Post’s Mike DeBonis.

But Rep. Gary Palmer (R-Ala.), a member of the more conservative House Freedom Caucus, said he wanted assurances of funding for the wall, given that it was such a key part of Trump’s campaign. “That’s clearly the sentiment of his base,” Palmer said, noting that it was still Trump’s position a week ago. “I’d be shocked that the president did a deal that there would not be a wall.”

Brat’s highest-profile supporter in 2014, conservative radio host Laura Ingraham, was apoplectic Wednesday night as Schumer and Pelosi announced the construct of what they were negotiating with Trump.

Ingraham noted that Trump was being praised by David Axelrod, Obama’s onetime top political adviser, tweeting: “What does that tell you abt any “deal” cut over #DACA?”

But the president tweeted Thursday morning that he wanted a compassionate policy for people who are now in college and serving in the military: “Does anybody really want to throw out good, educated and accomplished young people who have jobs, some serving in the military? Really!”

Cantor couldn’t have said it better himself. In fact, he did. “We want to make sure we’re compassionate and sensitive to their plight,” he said on NBC’s “Meet the Press” in 2013. “These kids know no other place as home.”

Read more from Paul Kane’s archive, follow him on Twitter or subscribe to his updates on Facebook.