President Obama supports the idea. So does Mitt Romney. In fact, it's one of the few major points of consensus on immigration policy between Democrats and Republicans. So what doomed a proposal to give more green cards to immigrants who get science, technology, engineering and mathematics graduate degrees in the United States?

Virginia Tech students at the Math Emporium. (Jared Soares / For The Washington Post)

The short answer: House Republicans decided to attach the STEM visa expansion to the elimination of another long-standing visa program — a condition that House Democrats soundly rejected.

The longer story is that, before the August recess, Rep. Lamar Smith (R-Tex.), Sen. Charles E. Schumer (D-N.Y.) and other legislators had been engaged in seemingly promising bipartisan talks to bring forward an immigration overhaul that included the STEM visa proposal. "We had barely gotten back a consensus on immigration — that some increase on immigration is good," says Muzaffar Chishti, director of the Migration Policy Institute's Office at New York University, who describes the talks as the first genuinely bipartisan immigration effort that went beyond border security since 2006.

When Congress came back from recess, however, the bipartisan talks disintegrated because legislators couldn't come up with a compromise on family reunification, a Schumer aide told the National Journal. So both Smith and Schumer came up with separate partisan bills.

Smith made the addition of STEM visas contingent upon the elimination of a diversity visa program that uses a green card lottery to let in immigrants from underrepresented countries, who only have to have a high-school education. The net number of green cards issues—55,000—would remain the same. Schumer, together with Rep. Zoe Lofgren (D-Calif.), introduced a separate STEM bill that didn't eliminate the diversity visa lottery.

That's why House Democrats overwhelmingly rejected Smith's bill on Thursday, which failed 257-158, with just 30 Democrats voting to support it. Their main argument was that one group of immigrants shouldn't be disadvantaged for another group to be let in. "We strongly oppose a zero-sum game that trades one legal immigration program for another," said Rep. John Conyers Jr. (D-Mich.), according to the New York Times. Republicans accused Democrats of trying to sabotage the U.S. economy and spurning the tech companies that supported the bill to avoid handing the GOP a legislative victory.

Others, however, blame Republicans of playing politics by setting up the bill to fail so they could pin the blame on Democrats: The House GOP leadership put Smith's bill on what's known as the suspension calendar, which requires bills to have two-thirds instead of a simple majority to pass. Typically, the procedure is used to pass noncontroversial bills that are highly like to pass. But it can also be used "to create a difficult vote for whatever party isn't in control," says Mary Giovagnoli, director of the Immigration Policy Center. 

But even if you put the politics aside, there's still a major policy difference between Republican and Democratic proposals: Do we try to maintain the same overall numbers for legal immigration as we had in the 1990s, or should we look beyond quotas and encourage higher levels of legal immigration to stimulate the economy?

"If you're unwilling to let go of the numbers from the 1990s, you're always going to be looking to replace any new category," says Giovagnoli. "The diversity visa has become a relatively easy target — it's one of the few visas that's available to someone with no basic relationship to the U.S." 

Republicans maintain that higher-skill immigration should take priority. But Democrats cast the elimination of the program as "an attack on the poorer segments of the immigration stream," Giovagnoli explains, pointing out that nearly half of the diversity green cards go to immigrants from African countries who might not have another way to get to the United States. 

Pro-immigration advocates don't expect Congress to make another go at STEM visas until after the elections and were disheartened by the partisanship bickering on display this week. But some are heartened by the fact that legislators made even a preliminary effort to negotiate in good faith. "At least since 2008, the consensus in congress was 'no, no, no' on any immigration measure," says Chisti. "Now we have seen an immigration thaw: There's clearly a space for pro-immigration bills, and pro-migration bills."