At a hearing in Washington, D.C., last fall, U.S. Senator Carl Levin (D-Michigan) accused U.S.–based multinational corporations of systematically manipulating laws and regulations to avoid paying taxes. They may not be breaking the law, he said, but their "tax practices and gimmicks range from egregious to dubious validity."

The companies Levin singled out at the hearing do indeed use intricate strategies that enable them to lower their tax obligations. These same strategies are frequently used by global corporations based in Silicon Valley and other high-tech hubs. Some are huge companies with household brands: Google, Apple, Amazon. Others—start-ups and smaller tech companies—are also availing themselves of these complex tax strategies, which involve shifting ownership of intangible assets—primarily intellectual property—to overseas subsidiaries. "Every U.S. multinational and high-tech company of any significant size now has these international structures in place," says Eric Ryan, a tax lawyer at DLA Piper in Palo Alto. "It’s routine at this point."

It may indeed be routine, but at a time when the United States and other countries face record budget deficits and legislators debate how to increase revenues, these practices are coming under heavy scrutiny. U.S. lawmakers accuse corporations of gaming the system by moving profits offshore so they can pocket billions of dollars that should be going into the nation’s coffers. The Internal Revenue Service is cracking down on companies it believes are employing dubious practices to reduce their tax obligations to Uncle Sam. Compounding the issue, foreign governments that are struggling with deficits and revenue shortfalls are pointing fingers at multinational corporations headquartered in the U.S., angrily accusing them of manipulating the system and not paying their fair share of taxes overseas.

"There’s no question, there’s been an increased focus on these strategies," says John Warner, a partner at Buchanan, Ingersoll & Rooney in Washington, D.C., who specializes in international and corporate tax matters. "Regulators, legislators, and foreign governments are all taking interest."

The scrutiny is largely focused on a common corporate practice called "transfer pricing"—a term that describes how a multinational corporation allocates income and expenses among its worldwide affiliates for tax purposes. The practice, long-accepted under the U.S. tax code, has been used by companies for all types of goods and services for years, and more than 60 countries have adopted rules governing transfer pricing transactions.

But now companies are shifting their intangible assets—namely their intellectual property—to low-tax jurisdictions offshore and attributing expenses to countries with a higher tax rate. Critics say the companies are doing this strictly to lower their tax bills. And many, they attest, are a bit too creative with their accounting, so the valuations placed on their assets will work to the company’s tax advantage. These types of profit-shifting arrangements cost the U.S. government as much as $60 billion in annual revenue, according to a study by Kimberly Clausing, an economics professor at Reed College in Portland, Oregon.

"At a time when we face such difficult budget choices, and when American families are facing a tax increase and cuts in critical programs from education to health care to food inspections to national defense, these offshore schemes are unacceptable," Levin said in a statement prior to the fall hearing.

What are these transfer pric ing schemes? There are variations, but they all involve arranging transactions between subsidiary companies to take advantage of the idiosyncrasies of varied national tax codes. The techniques are most prominently used by tech companies, which can easily shift large portions of profits to other countries by assigning intellectual property rights to subsidiaries abroad.

In one of the more popular and complex schemes used, a company will route profits through subsidiaries in Ireland, the Netherlands, and the Caribbean—all of which are low- or no-tax jurisdictions. A parent company will transfer some of its IP to an Irish incorporated subsidiary—a holding company "tax-resident" in a no-tax jurisdiction, such as Bermuda. The Irish company will then sublicense the IP to another subsidiary, which is tax-resident in the Netherlands. Both of these companies may have few, if any, employees and may even operate from a post office box. The Dutch company will in turn sublicense the IP to a second Irish subsidiary that is wholly owned by the first Irish company. That second Irish subsidiary, which is an operating company with an office and employees, will sublicense the IP to other corporate subsidiaries outside the U.S.

This intricate system enables a company to save on taxes in multiple ways: The second Irish company receives royalty payments for the licenses, but it only keeps a small amount of these, passing the rest to the Dutch subsidiary. It pays tax only on what it retains, and the royalties paid to the Dutch company can be deducted against the royalty income received. The Dutch subsidiary keeps a small amount and passes the rest to the first Irish subsidiary. Since that company is based, for tax purposes, in a tax haven such as Bermuda, those royalties are not taxed.

This elaborate tax structure, which is entirely legal, even has a name: the Double Irish Dutch Sandwich. Apple Inc. was one of the pioneers of this system back in the 1980s, but hundreds of other multinationals have now caught on, says DLA Piper’s Ryan, who was tax director at Apple in the 1980s and helped establish and defend the company’s international tax structure. "A lot of countries now actively encourage companies to set up within their borders to take advantage of their low tax rates," he says. "Their governments even have offices in the U.S. to promote their tax benefits." (Fittingly, Ryan was in Amsterdam when he talked to Corporate Counsel .)

Other tech companies known to use the convoluted but highly effective tax savings scheme include Google Inc., Inc., Adobe Systems Inc., and Microsoft Corporation.

To be sure, multinational corporations have a big incentive to shift profits out of the U.S. The corporate tax rate here is 35 percent—one of the highest in the world. If done right, a company’s overseas tax rate can be significantly lower. Apple, Oracle, Microsoft, and IBM Corporation reported tax rates of 4.5–25.8 percent on their overseas earnings between 2007 and 2009. "Transfer pricing is a perfectly acceptable, common, appropriate, and legal way for a company to structure its business affairs," says Andy Gottlieb, former general counsel at Novellus Systems Inc., a semiconductor equipment maker that merged last year with Lam Research Corporation and engaged in transfer pricing. "Companies should be looking at ways to??enhance shareholder return. That’s their job."

Setting up transfer pricing transactions is not easy. It is highly regulated, and over the years the U.S. Department of the Treasury has issued thousands of pages of rules governing such arrangements. The key concern for regulators is whether the transfer prices between a multinational’s various companies are established on a market-value basis. They are supposed to be determined at "arm’s length," meaning that prices should be the same as they would have been had the parties to the transaction not been related to each other. This requirement is imposed with the aim of preventing companies from systematically moving around their assets to low-tax jurisdictions.

But this is where disagreements between regulators and companies arise. "Pricing IP is not an exact science," says John Ryan, a partner at Bingham McCutchen in Palo Alto who specializes in tax planning and audit defense. "IP is unique and noncomparable, so even with the best of intentions, estimates of an ‘arm’s length’ price can be far apart." Even when companies settle disputes with the IRS over taxes owed on transfer pricing transactions, the government is lucky to get 4 or 5 percent of the proposed amount, he says.

Also, most transfer pricing transactions between a parent company and its offshore subsidiary would never occur between unrelated parties, notes Kenneth Clark, a partner at Fenwick & West in Silicon Valley, where he chairs the firm’s tax litigation group: "So there can be reasonable disagreements as to what constitutes an arm’s length price."

But the IRS is cracking down nonetheless.

In late December the IRS filed a case against Amazon in U.S. Tax Court in Washington, D.C., saying that the online retailer owes $234 million in taxes for the 2005 and 2006 fiscal years. The case centers on a transfer pricing dispute. Amazon argues that the IRS is overestimating the value of its intangible property, which includes computer software, trademarks, and marking assets, according to the court filing.

Juniper Networks Inc. disclosed last year that the IRS is claiming that the company underpaid taxes related to transfer pricing transactions and owes almost $900 million in additional taxes for the 2004–06 fiscal years. The Silicon Valley–based company, which makes networking equipment, is fighting the IRS ‘s claims.

Eaton Corporation, which manufactures electrical components, is going to Tax Court to contest the IRS ‘s claim that it owes $75 million in taxes related to transfer pricing transactions. The Cleveland-based company announced in May that it will move its headquarters to Ireland, where the corporate tax rate is 12.5 percent.

Other tech companies have disclosed transfer pricing disputes with the IRS, including AOL Inc., Adobe, Hewlett-Packard Company, Microsoft, and Yahoo Inc., to name a few. Press reports have indicated that Google is being audited on some of its transfer pricing transactions. The amount of money at stake in all these matters is quite large," Bingham’s Ryan says.

Lawyers and economists say that the IRS’s renewed aggressiveness is due largely to the arrival of Sam Maruca, who was hired in 2011 to fill the agency’s newly created post of transfer pricing director. The experienced international tax specialist, who worked at Covington & Burling before joining the agency, is highly respected and knowledgeable, they say. "Maruca came in and hired a cadre of people from the private sector—people who knew where the vulnerabilities were," says Warner, who has known Maruca for many years. He brought in accountants, economists, and lawyers from Big Four audit firms such as KPMG and Ernst & Young, and from the economics and tax consulting firm Horst Frisch. He also hired experienced tax attorneys from private law firms.

Even before his arrival, the IRS had been trying to stop companies from manipulating the system. But the agency suffered harsh defeats in several transfer pricing cases brought against companies it claimed had undervalued assets and skirted around regulations to avoid paying taxes. In one, brought against Veritas Software Corporation, now part of Symantec Corporation, the IRS said the company owed about $545 million in contested back taxes, plus interest. But the court strongly disagreed. In his opinion, U.S. Tax Court Judge Maurice Foley rebuked the agency, calling its calculations "arbitrary, capricious, and unreasonable."

"That loss emboldened tax advisers who help companies set up transfer pricing arrangements," says Elizabeth King, an economist specializing in transfer pricing issues at Beecher Consulting in Boston. "It creates enforcement problems when the IRS loses a big case." King previously worked at Price Waterhouse and at the IRS.

But many think that under Maruca’s leadership, IRS examiners and economists are getting the tools they need to not only avoid fiascos like Veritas, but also to find a test case that will have an impact and send a message. "People in the tax advising community believe that Sam will start bringing cases that ought to be brought—cases in which there is real evidence that a company has underpaid its taxes," says Warner.

While a test case may still be a few years off, some believe that Maruca is already making his mark. Fenwick’s Clark, for example, says that he sees many more IRS attorneys in attendance at audit appeals conferences. And John Ryan says the agents are more ­organized and better prepared than in the past.

The renewed rigor by regulators has made tech companies in Silicon Valley nervous. They’re discovering that they’re more in need than ever before of tax planners and audit specialists. And law firms in the area are, not surprisingly, answering the call.

Bingham McCutchen, which didn’t have a tax practice in Silicon Valley, hired John Ryan away from McDermott Will & Emery, and Robert Kirschenbaum from Miller & Chevalier, to set up a tax practice there. Last year Skadden, Arps, Slate, ­Meagher & Flom moved two tax partners from Washington, D.C., to Palo Alto, and also hired Matthew Kramer, a former IRS attorney, as counsel. And in December, Foley & Lardner announced that Frederic Adam, who was a KPMG tax partner specializing in international tax matters, had joined its tax practice.

And the work isn’t just coming from the usual suspects. Silicon Valley–based attorneys say they are getting calls from start-ups that need tax planning guidance to set up transfer pricing arrangements as they expand globally. Many of Silicon Valley’s startups are managed by former senior executives of big tech companies that successfully used transfer pricing to lower their effective U.S. tax rate, says DLA Piper’s Ryan: "It’s not a foreign concept for them."

While activity in Silicon ­Valley is heating up, lawmakers in Washington are also on the warpath. Levin, who chairs the powerful Senate permanent subcommittee on investigations, made his harsh statements during a hearing on offshore profit-shifting activities. The subcommittee has reportedly looked at the activities of Google, HP, Microsoft, Apple, and some biotech companies. Part of their focus has been on the companies’ offshore profit-shifting practices and the impact they have on the budget deficit.

At the hearing, the subcommittee revealed ways in which tech giants Microsoft and Hewlett-Packard have taken advantage of tax loopholes and used transfer pricing arrangements to avoid paying billions of dollars in U.S. taxes. It said Microsoft transferred the U.S. rights to intellectual property offshore, and then bought back a portion of those rights to make U.S. sales—an action it characterized as a "gimmick" to avoid U.S. taxes on 47 percent of the revenue from Microsoft products developed and sold in the U.S.

Between 2009 and 2011, the Redmond, Washington–based company used transactions with subsidiaries in Puerto Rico, Ireland, Singapore, and Bermuda to shift nearly $21 billion offshore—almost half of its U.S. retail sales net revenue, saving up to $4.5 billion in taxes on goods sold in the U.S., according to the subcommittee.

Investigators also said that Microsoft was able to use other tax regulations to avoid paying an additional $2 billion in U.S. taxes on passive income, such as royalties, at its offshore subsidiaries. Other companies that use this strategy include Apple and Google, the subcommittee said. In fiscal 2009, 2010, and 2011, Apple deferred taxes on more than $35.4 billion in offshore income, and Google on more than $24.2 billion, the investigators found.

Hewlett-Packard, subcommittee investigators revealed, has used a series of short-term internal loans that allowed it to tap its offshore cash for domestic operations without paying taxes. Under tax law, foreign profits are subject to U.S. tax when they are "repatriated," or brought back to the U.S. But there is an exception for loans that are repaid within 30 days—a loophole that HP exploited, according to the committee’s tax experts.

At the hearing, Microsoft and Hewlett-Packard denied any wrongdoing.

Attorneys say the goal of Levin’s committee has been to shed light on the ways in which global corporations find ways to shirk their tax obligations. "Levin has made clear that he thinks that even if they are operating within the letter of the law, their ethics are at best questionable," says DLA Piper’s Ryan.

Levin’s committee has also been seeking ways that Congress can fix the system, or at least plug loopholes. One idea floated by the Obama administration is that even if a portion of a company’s profits reside in a foreign subsidiary, those profits should be taxed in the U.S. if the foreign tax rate is low. "But this would require a fundamental change in tax law, and corporate America would view any such proposal as anticompetitive," Ryan says.

In Europe, meanwhile, lawmakers have been hammering multinationals that use transfer pricing schemes to avoid paying taxes in the jurisdictions in which they operate—despite the fact that they earn billions throughout Europe. In France, authorities reportedly raided Google’s offices in Paris and seized documents related to a tax dispute. The French government has already presented Google with a tax bill for $2.18 billion. Amazon has been given one for $252 million. Facebook Inc. is also believed to be on the hook for back taxes. And in the United Kingdom, members of Parliament in November accused Amazon, Google, and Starbucks Corporation of being "immoral" and "manipulative," and of "practicing tax avoidance on an industrial scale." An investigation revealed that Starbucks had paid no corporate tax in Britain for 14 of the last 15 years, prompting boycotts and demonstrations.

Other companies engaging in these practices are less visible and therefore perhaps less vulnerable. But outrage in Europe is so strong, many predict that the European Union will soon try to make a coordinated effort to curb these practices. In a strident speech at Davos in January, the British prime minister, David Cameron, declared that abuse of tax systems was "an issue whose time has come."

He said the U.K. would use its presidency of the G8 group of rich nations to push for global action against corporate tax evasion and "aggressive" tax avoidance. And in a swipe at Starbucks, he declared that "any businesses who think that they can carry on dodging their fair share or that they can keep on selling to the U.K. and setting up ever-more complex tax arrangements abroad to squeeze their tax bill right down—well, they need to wake up and smell the coffee because the public who buy from them have had enough."

Strong words from politicians don’t always translate into action. And it remains to be seen whether real changes can take root in the U.S., Europe, and elsewhere. International treaties come into play. Low-tax nations that use their tax structure to lure investment will have to cooperate. But the influential Organization for Economic Cooperation and Development has vowed to play a key role in any coordinated effort to resolve these problems in Europe, in the U.S., and throughout the world. "That could change the game," Bingham’s Ryan says. "And it’s causing the companies a great deal of anxiety."

If changes do come, however, it doesn’t necessarily mean that the impact on multinationals will be devastating, says King. "There are a lot of creative tax lawyers out there," she says. "They’ll probably figure out how to get around the changes."