Tech companies in booming Silicon Valley, where engineers are in high demand but short supply, are facing the most competitive rush ever to secure US work visas for their foreign hires.
Starting in April, the US will accept applications for this year's quota of 85,000 H-1B visas, which are allotted for skilled workers and one of the main avenues for foreigners wishing to work legally in the US.
(Read more: SiliconValley boom eludes many, drives income gap)
Last year, that allotment went in the first few days after applications opened. This year, immigration attorneys and company executives say, the race will be as tough, if not tougher, as rising tech valuations have fuelled demand for coders.
That is pushing some companies to think more strategically than before about immigration, said John Bautista, a partner with Orrick, a law firm in Silicon Valley.
In the past few months, he says, some companies with US-only operations have started asking whether they could open a new office abroad in order to hire people and then bring them into the US on a type of visa allocated to existing employees for internal transfers.
"Before [corporate boards said], 'We've got someone we want to hire, what's the best way to bring him over?'", said Mr Bautista. "Now it's, 'We have a hiring problem, let's use the immigration laws to come up with an overall strategy to bring teams of people on board.'"
Immigration reformers such as tech lobby group FWD.US have tried to make it easier to hire skilled foreigners. Progress has been slow, however,amid a fight over how to address the millions of undocumented workers already in the US.
Other companies are looking to visas given to high achievers in the sciences or for educational exchanges, said Matthew Faustman, chief executive of Up Counsel, a legal services start-up. Those types of permits, known as J1 or O1 visas, can be trickier to apply for but are not capped as strictly as H-1Bs.
Competition for those workers has driven up salaries as companies compete for graduates and poach each other's hires. Entry-level programmers can earn over $100,000 while interns at companies such as Twitter can command more than $6,000 a month, according to research by career site Glassdoor.
(Read more: In SiliconValley, 'young boys club' still rules)
"The supply [of tech workers] just doesn't meet the demand right now," said Shayan Zadeh, the Iran-born founder of dating start-up Zoosk.
When Mr Zadeh first got a visa to the US, he had to hitchhike part of the way from his native Iran across the border to Turkey in order to submit his application at the embassy there. Now he is a US citizen and trying to get visas for three, possibly four, hires the company wants to make for its engineering and marketing teams. Part of the challenge for managers, he says, is the uncertainty of the process, as visas are given out by lottery. Even those who get visas are not allowed to start working in the US until October.
"If you're not lucky, you lose the talent you're trying to recruit," he said.