Alliances between companies can be risky, but managers can work to ensure the best outcomes from these strategic partnerships. A new study offers a roadmap for companies looking to team up without taking a wrong turn.

“Too often firms, especially small ones, rush into an alliance haphazardly without asking key questions about which partners make the most sense, how an alliance should be structured, and what is the exit strategy for when an alliance is no longer productive,” says Frank Rothaermel, chair of business and professor of strategy and innovation in the Georgia Institute of Technology’s Scheller College of Business.

Rothaermel has spent years examining thousands of research and development alliances forged between firms in the pharmaceutical, biotechnology, and other industries to understand what makes those partnerships work. Time after time, it came down to several key steps.

First and foremost: Picking the right partner. Before rushing to join forces, companies should take a step back and ask, ‘Are we right for each other?’

“Managers shouldn’t assume that the partnership will be beneficial based on a loose understanding of the other firm’s goals and experience,” Rothaermel says.

Potential alliance partners should be evaluated based on whether they contribute strategic value and complement the firm’s existing portfolio of partnerships, write the researchers.

Rothaermel and coauthor Ha Hoang, a professor of management at ESSEC Business School in France, highlight partnerships Tesla Motors Inc. forged with automakers Daimler AG and Toyota Motor Corp. to help bring its electric cars to market. While Daimler helped Tesla with a cash investment and engineering expertise, Toyota provided the electric carmaker with access to an automobile manufacturing plant. More recently, Tesla added a partnership with Panasonic to their portfolio to build the Gigafactory to produce lithium-ion batteries.

When negotiating the terms of a new partnership, larger companies would be wise not to rush to leverage their size to achieve an unfair deal for the smaller company.

“Negotiators who focus on capturing the lion’s share of the potential value at the expense of their partner run the risk of undermining the alliance and seeing little in actual gains,” the researchers write.

Other steps are also essential, such as ensuring all partners stay on the same page operationally in a bid to head off potential problems. Another crucial part of the process: knowing when and how to call it quits.

“One executive we interviewed admitted that the lack of an exit plan left his company at a loss for what to do when a larger partner terminated their four-year partnership,” the professors write.

And finally, diversify. Just like an investment portfolio, rather than relying on one key partnership, build alliances with multiple firms to lessen the impact if one partner jumps ship.