In Silicon Valley, companies that collaborate one day can become bitter rivals the next.

And two recent trade secrets disputes pitting small ventures against tech veterans Google and Intel highlight the potentially expensive consequences when a company spills its secrets — even under the protection of nondisclosure and confidentiality agreements.

In both cases, the smaller company is accusing the larger one of pretending to be interested in partnership, then ripping off their business plans.

There are risks on both sides of the deal table and no surefire way to prevent what seems at first to be a promising business opportunity from resulting in years of litigation, according to trade secrets lawyers.

“Emerging tech companies need to sell products and should be able to partner with larger companies without having the IP migrate to a competitor,” said Spencer Hosie of Hosie Rice, who represents Zettaset Inc. in the suit against Intel.

Hosie complains that when smaller companies act to enforce the terms of a nondisclosure agreement or assert their patent they get “pilloried as a troll.”

Paul Hastings partner Bradford Newman, who advises mostly established tech firms, says that accusations of theft are often a knee-jerk — and usually unfounded ­— reaction to a failed collaboration. Actual theft is far less common than startups allege, says Newman, because stealing is simply “bad business.”

Companies like Google and Intel spend hundreds of millions of dollars on research and development, he said.

“To steal something rather than buy it — if in fact they did that — is bad business. It’s saying, ‘We’re a huge enterprise with thousands of employees. We do $100 million in M&A every year. And then here comes some little company with this awesome idea. And we don’t want to throw them $5 million or $10 million?’” he said. “So I’m skeptical.”

In the early stages of a negotiation, both sides want to build trust and seem reasonable. Company executives may hesitate to hold back information or demand protections if they fear it will jinx a deal, lawyers said. But regrets often follow when discussions sour and airtight agreements weren’t hashed out in advance.

Zettaset sued Intel this month in Santa Clara County Superior Court after nearly a year of discussions between the two firms around Zettaset’s Big Data software solution, Orchestrator. Talks fizzled in January and Intel unveiled a rival product the following month which Zettaset claims is a virtual carbon copy.

In another trade secrets suit, Be In Inc. accuses Google of stealing its idea for a social networking platform where friends could share music and videos in real time. Executives at the New York startup say they shared details of the concept with a Google employee and the company launched “Hangouts”, a highly similar feature, on its Google+ social networking site the following month. A federal judge dismissed Be In’s claims, but gave the startup, which is represented by Morrison & Foerster, a chance to refile.

In both cases, nondisclosure agreements were in place.

The cases against Google and Intel are recent iterations of a common fact pattern. Last year, a jury in the Central District of California ordered Best Buy Co. to pay $22 million to TechForward after it found that the electronics retail giant had breached a nondisclosure agreement and willfully stole the smaller firm’s trade secrets.

Orrick, Herrington & Sutcliffe partner Michael Spillner, who runs the firm’s Trade Secrets Watch blog, says that while the risks of losing trade secrets during collaboration with another company might seem remote in the beginning of a partnership, he’s seen plenty of cautionary tales.

Spillner represented Tekmira Pharmaceuticals Corp. in a dispute with Alnylam Pharmaceuticals Inc. that settled two days before trial for $75 million. The two companies had collaborated on genetic research in confidential meetings, and Tekmira claimed Alnylam both sold some of its manufacturing secrets to a third party and also applied for related patents.

“The risk from a trade secret owners’ perspective is that somebody who’s a collaborator today could be a competitor tomorrow,” says Spillner. “That’s the problem. You’re exposing your secrets to this other company that might not be in your space and you might enable them to compete with you.”

While there’s no way of eliminating the risk completely, Spillner advises clients to fine-tune nondisclosure and collaboration agreements and be clear about any exceptions to them. Companies sharing secrets should insist access is limited to as few people as possible on the other side, he said.

“Here’s the lesson: They can’t steal what they don’t have,” Spiller said. “Don’t share what you don’t need to share. Try to do it without giving the other party your crown jewels.”

After seeing one startup’s collaboration with a larger firm “go south,” Kristen Dumont of Goodwin Procter says she has started inserting clauses into nondisclosure agreements to require that the party receiving access to confidential information notify her clients as soon as they make a decision to develop their own product. That doesn’t prevent theft, she says, but it can limit the damage.

In evaluating the risk of revealing secrets to a bigger company, Dumont, who mainly advises startups and emerging tech businesses, asks her clients to think about merger talks like a date. “I always ask them: Is this a pity date or a real date?” she said.

Small companies may be able to protect their interests by slowly dribbling out secrets but ultimately good collaborations demand commitment, she said.

“At some level, there has to be trust,” she said. “If you assume that everyone is going to steal from you, your idea is not going to leave your garage.”

Lawyers who regularly advise large companies say their clients are also vulnerable at the negotiation table and open themselves to allegations of theft any time they choose to forego an acquisition and instead create their own product.

Even the allegation of theft can pose serious legal headaches. Orrick’s Spillner says companies can protect themselves against future suits with procedures that restrict access to confidential materials and wall off engineers and computer scientists from the team working to approve or reject the deal.

Sharon Flanagan, a corporate partner at Sidley Austin, has advised companies including eBay Inc. and Genentech Inc. on deals. For protection, she suggests clients insert a residual clause into confidentiality or nondisclosure agreements that excludes information disclosed during talks and retained by the unaided memory.

Buyers generally have the upper hand in negotiations and don’t have to agree to stricter terms sought by smaller companies, says Flanagan.

“I think it’s just business reality,” she said. “Typically, buyers have more leverage. If it’s a serial acquirer, they need to protect themselves from these types of claims. If the deal doesn’t happen, a [smaller] company will look at the natural alternative.”

Contact the reporter at mtaves@alm.com.