He started a company and created seven jobs in the Bay Area since moving to the U.S. in 2011. But immigration authorities tried to deport him earlier this year.

The Canadian techie, who agreed to speak on the condition of anonymity, was in the U.S. on an H-1B visa, the most common type of visa for immigrant workers.

But H-1B petitions must be sponsored by an employer, which makes it difficult -- but not impossible -- for startup founders to qualify. Holders must prove they can be hired, fired, paid and controlled by the company.

"The policy is very, very strict," said Tahmina Watson, who heads up Watson Immigration Law and represents the entrepreneur. "The administration says, 'We want to keep talented people in the U.S. and want people to open and grow companies in the US. [But it's] disconnected to the restricted policy."

Her client experienced the full force of that policy when he received a letter in January 2014 saying his visa was going to be revoked because officials had learned he was a cofounder.

His company was in the midst of preparing for a major industry conference and releasing a new product.

"We were crunched in terms of time," he said.

Related: 10 best cities to launch a startup

It's still unclear what tipped U.S. Citizenship and Immigration Services off (and they declined to comment on specific cases), but it could have been the result of a workplace "check-in" less than a year before, which the USCIS does in order to detect visa fraud. Watson's client was one of 76,000 site visits since the program started in 2009, according to USCIS deputy press secretary Jeff Carter.

The "vast majority" of site visits are found to be in compliance, Carter said in an email.

It's possible to challenge USCIS' findings, but it's time-consuming and expensive.

"This case took away a lot of time and energy from me and my co-founder," the founder said. "Honestly, I thought I had less than a 50% chance of success."

He and Watson spent about five months gathering paperwork -- first to prove he was needed by the company, and then that the company controls him (and not vice versa). The four-inch packet of documents ultimately included everything from internal emails and W2s to a letter from their accountant stating the client doesn't control payroll.

"I can't really describe the feelings of despair I went through," he said. "I actually hid the visa issue from my wife for about two months to save her from stress and tears."

Related: U.S. losing tech talent to Canada

If he were deported, there was no way to protect the company, which counts major television networks among its clients.

"I built the product from the ground up. If I left the company, that could cause investors to lose interest," he said. "When they invest, they expect the founders to stay."

He was ultimately successful and kept his visa (after months of stress and $15,000 in attorney fees).

Vivek Wadhwa, a fellow at Stanford Law School, said Watson's client is far from the only one dealing with this issue.

"I hear about it practically everyday -- a great entrepreneur being forced to leave the country and can't stay to run their company," he said.

Wadhwa said 44% of Silicon Valley startup founders are foreign-born, a number that has stagnated over the years.

"These archaic rules don't allow entrepreneurs to work for their own companies," said Wadhwa. "How does that make sense?"

Related: Israeli startups flock to New York

Watson and Wadhwa agree that the current visa options simply aren't adequate -- especially for entrepreneurs and startup founders.

Not providing tech talent with a permanent path to residency hinders their ability to raise money -- and the U.S.' economic growth as a result.

"Investors tell me, 'If a person cannot stay in the U.S., we cannot invest in them because it's akin to having a terminal illness,'" said Watson, who is writing a book about the need for a startup visa.

"I feel lucky that I salvaged the visa for my client," said Watson. "[But] he's an example of what's wrong with the current policy."