Six years ago, the Heritage Foundation helped kill immigration reform. Now the conservative think tank is on the defensive, fielding attacks from left and right over its claim that reform would cost trillions. The change is a sign of why reform is far more likely to survive this time around.

In 2006 and 2007, senior research fellow Robert Rector wrote two reports that helped kill immigration reform the following year -- one predicting a flood of 100 million new legal immigrants over the next 20 years, the other again finding that reform would swell the welfare ranks. Senators referenced it during debates; Rush Limbaugh caught then-Vice President Cheney off-guard by asking about the findings in an interview.

A Heritage report co-authored by Rector released this week made similar claims. But this time reform supporters were ready -- and coming from the right.

The pro-reform CATO Institute put out a paper back in April calling some of Rector's past work on the issue "fatally flawed," in part for not using the dynamic scoring favored by Republicans in budget disputes. Sen. Marco Rubio's chief of staff highlighted on Twitter a different Heritage report arguing that immigrants -- skilled or non-skilled -- boost the economy. A group of conservatives released its own analysis finding that more immigrants would lower the deficit.

After the report came out, Rubio (R-Fla.) himself called it "flawed" and not legitimate. In response, the think tank acknowledged that "Heritage has worked with Sen. Rubio on numerous issues and we admire him." Former Mississippi governor Haley Barbour (R)  called it "a political document" and "not very serious analysis." Sen. Jeff Flake (R-Ariz.) also pushed back:

Meanwhile, immigration reform's traditional defenders on the left have a bigger platform, thanks to the growth of left-leaning blogs and Web sites since 2007.

The Post's Wonkblog pointed out that the study's co-author has argued that there are deep-set, likely genetic IQ differences between races and that low-IQ immigrants should be kept out of the country. Heritage distanced itself from that argument, saying "its findings in no way reflect the positions of The Heritage Foundation." The American Prospect highlighted the fact that the anti-"amnesty" study is featured far less prominently on Heritage's Spanish-language site. (The report is being translated into Spanish, a Heritage spokesman says.)

That's not to say the opposition to immigration reform is dead or that Heritage's numbers won't again be used in the argument against it. But thanks to a divided right and a more nimble left, supporters are no longer easy to catch by surprise.

Update: Politico reports that Heritage is considering hiring an outside public relations firm to deal with the response to the report.