San Diegans already know full well that foreigners are competing for their jobs. They don’t need national politicians from Donald Trump to Bernie Sanders telling them to worry.

Consider the recent blowback from layoff decisions of two prominent regional companies, Qualcomm and Southern California Edison.

The layoffs highlighted a controversial corner of immigration policy occupied by H-1B visas, which allow companies to hire foreign workers for up to six years in “specialty” occupations such as software, engineering, biotech or even fashion modeling.

Early this year, Edison began displacing about 500 information technology workers, about 100 voluntarily and 400 through layoffs. But their functions were outsourced to Infosys and Tata Consultancy Services, two giant firms based in India.

Commentary More columns about Business by Dan McSwain

Before they left, some workers were compelled to train their replacements, and some of them were foreign nationals working in the U.S.

The H-1B program “was supposed to be for projects and jobs that American workers could not fill,” one Edison worker told Computerworld, an IT news magazine. “But we’re doing our job. It’s not like they are bringing in these guys for new positions that nobody can fill. Not one of these jobs being filled by India was a job that an Edison employee wasn’t already performing.”

California Inc. business newsletter Sign up for our business newsletter for the week's top business headlines from the editors of The San Diego Union-Tribune and the LA Times. Hits your inbox every Monday by 7 a.m.

In response, 10 federal lawmakers asked the Department of Labor to investigate whether the H-1B program can be used to directly replace American workers. As of June, that probe was under way, according to Sens. Jeff Sessions, R-Ala., and Dick Durbin, D-Ill.

Indirect replacement is no better, if you’re the one losing a job.

Last month, Qualcomm said it would cut roughly 15 percent of its global workforce, about 4,700 workers (it employs 15,000 in San Diego; 31,000 worldwide). Executives haven’t released any details, yet the news lit up social media.

“There are large, multistory apartment complexes in Kearny Mesa and Clairemont Mesa full of Qualcomm engineers from India,” said Gail Anderson, a commentator on the Union-Tribune’s digital editions. “I’d say send them all back.”

Hiring amid expansion

Qualcomm, which dominates segments of the smartphone industry, has received about 2,900 H-1B visas since 2009, a period of rapid expansion. Although some are probably renewals of three-year visas — federal agencies don’t break out those numbers for individual companies — the total works out to 19 percent of the 15,000 people the company hired over the last six years.

Put another way, Anderson is correct, in theory: Qualcomm might reach its domestic layoff target simply by firing guest workers.

However, business reality would seem to rule out the simple approach. As I mentioned, executives aren’t discussing layoff details.

Still, it stands to reason that if H-1B workers were necessary to begin with, arbitrarily firing them would hurt the company. This would hurt the 26,000 or so Qualcomm employees who remain, not to mention shareholders and customers.

It’s a familiar argument. Big tech employers say they struggle to fill highly technical jobs with qualified Americans, so the program is essential to international competitiveness. And losing that competition just sends more jobs overseas.

Tech workers in demand

Led by Microsoft (which recently cut 7,800 jobs), they’ve lobbied Congress to permit far more H-1B visas. Legislation caps tech visas at 85,000 a year, but exemptions for nurses, university researchers and others boost the true annual figure to 120,000 or so.

For perspective, the U.S. has allowed roughly 1 million immigrants a year over the last decade to legally gain permanent residency. Meanwhile, illegal immigration has been almost nonexistent since 2007, although 11 million unauthorized immigrants still live in the U.S., according to the Pew Research Center.

The H-1B program for temporary workers is clearly popular with employers. Federal officials in April received a record 233,000 applications, or nearly four times this year’s tech slots.

Criticism of the program comes from two directions: Many H-1B workers don’t become U.S. citizens, so hiring them ultimately transfers skills to foreign competitors.

Some pay lower wages

Meanwhile, they tend to depress wages. Regulations call for equivalent pay, but employers often use loopholes to pay at the low end of industry scales.

Others sympathize with foreign workers, saying the program amounts to indenturement because the visas belong to employers. Workers who lose jobs generally must leave the country. Such leverage adds potential for abuse.

Bernie Sanders, the Vermont senator seeking the Democratic presidential nomination, has said that, although some foreign workers are needed, the H-1B and other guest worker programs help business owners with cheap labor at the expense of workers.

“What right-wing people in this country would love is an open-border policy,” Sanders said last month.

In broad terms, this view is shared by Donald Trump, the Republican contender who last week issued a policy paper advocating a temporary halt to all immigration.

On H-1B visas, Trump favors boosting the prevailing wage for foreign workers until employers find it more efficient to hire Americans. He said Republican rival Sen. Marco Rubio’s bid to triple the number of such visas would “decimate women and minorities.”

H-1B joins campaign

Rubio, along with Jeb Bush and Democratic candidate Hillary Clinton, have called for comprehensive reforms that would provide paths to citizenship for unauthorized immigrants. Yet Sanders and Trump, who are drawing crowds and rising in polls, seem to be driving the immigration debate.

In his policy paper, Trump also cited academic research suggesting that U.S. schools are graduating plenty of citizens with degrees in STEM fields (science, technology, engineering and mathematics), but they are having trouble finding jobs. In other words, the ballyhooed STEM shortage is a myth.

Other studies argue the opposite. And rising wages for software engineers suggest tight supply.

Some economists say most Americans would be better off without H-1B visas — if Congress reformed immigration policy to offer residency and eventual citizenship for sharply higher numbers of people, putting skilled workers first in line.

More workers, higher GDP

The Congressional Budget Office reckoned the overhaul that passed the Senate in 2013 (but failed in the House) would have allowed 10 million more immigrants over the next decade beyond that allowed by existing law, boosting the level of gross domestic product by 3.3 percent.

Canada famously uses a point system that favors people with job offers and advanced degrees. The U.S. sticks to favoring family reunification, and doesn’t focus on skills.

In San Diego, the issue is far from academic. Recent immigrants long ago came to dominate low-wage jobs in hospitality, farming and landscaping. Then they moved into middle-wage jobs in construction and manufacturing.

Now natives increasingly encounter competition from young, hungry recent graduates in professional and technical services, a sector that has added a net 24,300 jobs since 2009 in San Diego County.

And Qualcomm is far from the only local employer using H-1B visas. The list ranges from biotech giant Illumina to Accelrys, a software firm.

Just as certainly, talented foreigners have played key roles in powering economic and technical achievement in San Diego.

Focus on innovation

At Achates Power, a startup that has invented a dramatically cleaner and more-efficient diesel engine, 10 percent of its 50 workers used H-1B visas and about one-third were born abroad, the Union-Tribune reported in 2013.

It’s easy to see why Congress is reluctant to discourage such innovation on U.S. soil. With the American economy gaining strength as the rest of the world slumps, global competition will only grow in ferocity.

Regardless of where talk of national reform ends up, the emotional power of the immigration issue seems unlikely to diminish.

For decades, workers have watched jobs disappear to foreign competitors inside and outside the U.S. And for years, pundits and politicians said boosting skills offered a path to job security.

Reality is more complex. Competition has arrived at the highest skill levels.

Increasingly, workers face the following stark choices: Settle for less money, or work harder and more skillfully than the guy coming for your job — or both.

Or you can wait for politicians to limit trade and immigration in ways that protect more jobs than they destroy. Given the dismal history of such measures, that could be a long wait.

Note: I've updated this column to make it clear the CBO estimated the Senate bill would have allowed permanent residency for 10 million more legal immigrants (potentially doubling new green card recipients) over the next decade. That's in addition to those permitted under current law, which varies from 10 million to 13 million in official estimates.