You can’t throw a brick through a Starbucks window in the Bay Area without hitting a tech executive who believes we need more high-skilled immigrants because the United States doesn’t produce enough computer scientists.

As it turns out, these folks are getting the causation backward. Importing high-skilled immigrants drives U.S. workers away from computer science jobs because it significantly depresses wages for technology workers, according to a new research paper. If we’re not producing enough high-skilled workers to fill tech jobs, it’s because we’re importing so many.

In a paper titled “Understanding the Economic Impact of the H1-B Program on the U.S.,” University of California, San Diego economist Gaurav Khanna and University of Michigan economists John Bound and Nicolas Morales analyzed the effects of the H-1B program on employment, wages, corporate profits and other factors in the technology sector between 1994 and 2001. They found that wages would have been between 2.6% and 5.1% higher without the H-1B visa program and employment of U.S. workers would have been between 6.1% and 10.8% higher.

And it’s not just tech workers who see lower wages. High-skilled workers in other fields also see their wages depressed when the tech sector imports worker–because they’re now competing against workers fleeing the tech sector.

While the economists focused on the last tech boom, their findings indicate the same dynamic applies to today’s workers. “An influx of foreign CS workers depresses the CS wage,” the economists write. Although the paper is written in dense economic jargon and equations illegible to the layman, the mechanism they describe is simple enough–it’s just supply and demand. Adding to the supply of tech workers, lowers the wages employers pay for those workers.

Faced with these depressed wages, college educated U.S. workers turn away from technology in favor of other fields. This tends to depress wages in those fields, the economists write. But because the influx of would-be tech workers may also increase the productivity of workers in those fields, overall wages may see a slight rise of between 0.04 and 0.28%. Much of those gains, however, are likely captured by the U.S. workers who otherwise would have gone into technology.

“[T]he influx of foreign high-skill workers will both crowd out and lower the wages of US high-skill workers,” the economists explain.

The research paper also explains why so many of the titans of technology insist that we need even more H1-B visas: importing foreign tech workers raises corporate profits.

“In our model, immigration also raises profits in the IT sector,” the economists write. “It is then no surprise that Bill Gates and other IT executives lobby in favor of increasing quotas for high-skill immigrants.”

But don’t foreign workers contribute to innovation? The economists answer this in the affirmative but find that this effect is not nearly large enough to fully compensate for the crowding out of U.S. workers.

Tech sector consumers may benefit from the influx of foreign workers–but only if those workers are as innovative as the U.S. tech workers they replace. That’s a pretty big if–and the economists admit this is merely an assumption they make in their study. If foreign workers contribute less to innovation than native workers would have, consumers may also lose out.

The paper, which was published by the National Bureau of Economic Research in February and reported on by the Wall Street Journal earlier this week, also has something to say about those who advocate loosening immigration rules for tech focused graduates of U.S. colleges and universities.

“We suspect that allowing essentially unlimited immigration of high-skill workers by, for instance, awarding green cards to all foreign students attending US colleges and universities would have dramatic effects on the US labor market,” they write. “Not all of these would be positive.”

That’s putting it pretty mildly.