PepsiCo Inc (PEP) has won a $363 million dispute with the Internal Revenue Service in U.S. Tax Court in a ruling of interest to companies seeking to avoid taxes when bringing cash from abroad into the United States.

At the heart of the decision is a longstanding tension in corporate finance and tax law between equity and debt, each of which offers certain advantages. Sometimes companies try to have it both ways by devising hybrid securities that look like debt in some circumstances, and like equity in others.

In the mid-1990s, PepsiCo, one of the world's largest beverages and snack food groups, moved to challenge rival Coca-Cola Co <KO.N> in Eastern Europe and Asia. Partly for tax reasons, PepsiCo chose the Netherlands as its home base for this effort.

The company, "engaging in legitimate tax planning," devised hybrid securities, which were treated as debt in the Netherlands and equity in the United States, Tax Court Judge Joseph Goeke wrote in a 100-page decision released on Thursday.

PepsiCo successfully argued it had an equity stake in its Dutch subsidiaries. The payments made to the New York-based parent company were nontaxable returns on capital investment, the court said.

PepsiCo sued the IRS in 2009 after the tax-collecting agency hit the company with a bill for taxes owed from 1998 to 2002. The IRS argued the company's Dutch payments to the parent company were debt interest payments from its Netherlands subsidiaries and subject to corporate income taxes.

A PepsiCo spokesman said the company was pleased with the Tax Court's decision. The IRS declined to comment.