The think tank that came of age as President Reagan’s policy shop back when amnesty wasn’t a dirty word is now leading the conservative opposition against immigration reform. Heritage Action, the newly created political arm of the Heritage Foundation, has abandoned the venerable organization’s scholarly gentility to plunge into the task at hand, which is making sure the immigration bill currently before Congress fails.

“They speak to a particular constituency, and they’re good at what they do in creating angst among Republicans because they speak to the people who can primary them,” says John Feehery, a former top GOP leadership aide. “So many members are risk-averse and they don’t want a hard-right challenge.”

Heritage’s main argument against the legalization of undocumented immigrants is its cost, and the belief that immigrants would drain social-service programs without kicking in enough taxes to the Treasury because they are largely uneducated and hold low-level jobs. “The structure of our welfare and entitlement system leads to amnesty costing taxpayers a lot of money,” Dan Holler with Heritage Action told The Daily Beast just hours before the nonpartisan Congressional Budget Office made public its conclusion that the Senate’s bipartisan immigration-reform bill would reduce the deficit over the next 10 years by $197 billion, and by about $700 billion over the following decade.

It’s not the first time Heritage has been put on the defensive. A report the think tank released earlier this year saying reform would cost an eye-popping $6.3 trillion was widely discredited, including by conservatives, and one of the report’s co-authors resigned amid reports that his doctoral thesis at Harvard asserted that Hispanic immigrants have lower IQs than whites. The report was meant to debut newly installed Heritage President Jim DeMint. Instead it exposed the long-simmering rift brewing in the GOP between pro-immigration conservatives and the newer Tea Party nativists. In broad terms, the divide is between those who accept the country as more diverse, seeing immigrants as a source of energy and economic growth, and what Feehery describes as the “nostalgia” wing of his party, “folks whose conservatism is defined by the ability to fight progress.”

Lots of conservatives have lined up on the side of immigration reform, notably anti-tax activist Grover Norquist; the Cato Institute, a libertarian think tank; the Chamber of Commerce; and the American Conservative Union. That doesn’t diminish Heritage’s clout; rather, it has found its niche. “They are the tip of the spear for the Tea Party,” says Feehery. DeMint gave up his South Carolina Senate seat last year to take the helm at Heritage, and to push the think tank into a more aggressive and hard-right role.

“Having Heritage as such a prominent vote on the right sends a signal to other conservatives—they don’t have to go along with the Norquist/ACU position,” says Mark Krikorian with the Center for Immigration Studies, an opponent of the reform effort. “There has been such a concerted and organized effort on the right to marginalize other voices on the right. Heritage makes it more of a fair fight.”

Heritage Action has made a secure-the-borders-first amendment the first test of its clout. They oppose the move on the grounds that voting for it would give conservatives political cover to support the immigration bill. They’re warning that any senator who votes for the amendment will be downgraded and get an X mark on their scorecard. The amendment offered by Texas Republican John Cornyn would require 90 percent certainty of border control before an already onerous 13-year path to citizenship can be triggered. Heritage is not the National Rifle Association, and lawmakers aren’t quaking with fear, but the group’s demands and its role in the debate are emblematic of the fault lines within the Republican Party as the immigration bill moves through Congress to an uncertain fate.

The irony is that Democrats see the Cornyn amendment as a “poison pill” designed to sink the bill, and if the amendment goes down, it will be with the help of conservative Republicans following Heritage’s vote recommendation, says Marshall Fitz with the liberal Center for American Progress. “It’s like they didn’t get the joke.”

Cornyn has crossed swords with Heritage in the past when he chaired the Republican Senate campaign committee and didn’t always back Tea Party candidates. “He’s not a fan of Heritage,” says Feehery, who points out that Cornyn has a lot of sway within the GOP caucus and could become “ultimately the savior of the bill.” If Cornyn ends up voting for the bill, “they’ll get 75 votes,” Feehery predicts. If he doesn’t, the vote total will be closer to the low 60s, limping over the finish line, “and you can’t have this bill limping,” he says.

The bill’s future in the House is intertwined with Speaker John Boehner’s future and his willingness to put his speakership on the line. On Thursday morning, after California Republican Dana Rohrabacher said Boehner “should be ousted if he rams through an immigration bill without majority Republican support,” Boehner tried to reassure conservatives in a closed-door meeting that he would abide by the so-called Hastert rule and not bring a bill to the House floor without majority GOP support.

“He’s got to decide whether he wants to risk his speakership over this, and apparently he doesn’t,” says Feehery, noting there are big fights ahead over the budget and tax reform, and if Boehner forges ahead on immigration, he could lose his caucus, and his speaker’s gavel. On that point all sides agree. “I don’t think Boehner is opposed in any principled sense [to immigration reform] if I can use principled in the same sentence with Boehner,” says Krikorian. “He does value self-preservation.”