RINGASKIDDY, Ireland (Reuters) - Drugmaker Pfizer's (>> Pfizer Inc.) plans to take over Allergan (>> Allergan, Inc.) have faced a political backlash in the United States over fears a deal would lead to the company shifting its headquarters and taxable profits to Ireland.

However a Reuters examination of corporate filings in Europe, patent databases and other information shows the company has for over a decade been shifting profits generated by American scientists and patients overseas - to a subsidiary based in the rolling hills of County Cork.

Pfizer and Allergan are in talks to create the world's biggest drug company by market value and analysts expect a deal would likely involve Pfizer "inverting", or reversing into the smaller, Irish-registered Allergan.

Ireland's tax rate is 12.5 percent, a fraction of the 35 to 40 percent levied in the United States.

President Barack Obama has described inversions as unpatriotic and last year changed some tax rules to make inverting less attractive. Allergan investors fear the U.S. treasury department may scupper a deal with additional measures.

Yet any such actions would already be too late to stop New York-based Pfizer from reporting in Ireland profits tied to its U.S. activities.

Pfizer has used transactions between companies within its group to allow an Irish subsidiary based in Ringaskiddy - Pfizer Ireland Pharmaceuticals - to buy the rights to patents developed in the United States and then use them to make drugs which are sold back to U.S. affiliates.

Even though the Irish and other overseas units pay $3.2 billion a year in royalties to use such patent rights, the higher prices at which Pfizer in the United States imports manufactured drugs from affiliates means almost all the profits from these drugs are reported overseas.

Drugs which were discovered in the United States, manufactured in Ringaskiddy and sold back to the United States include anti-cholesterol treatment Lipitor - the best-selling prescription drug of all time - and epilepsy drug Lyrica, which generated revenue of over $5 billion last year for Pfizer.

Pfizer's actions are entirely lawful and all companies seek to manage their tax bills down.

The drugmaker said the prices it used for its inter-subsidiary transactions were fair and that its business structure was motivated primarily by a desire for operational efficiency rather than tax minimization.

"Pfizer fully complies with all applicable accounting and tax laws in the jurisdictions in which we operate and pays all taxes due," spokeswoman Joan Campion said.

Jerry Buttimer, a member of the Irish parliament in whose constituency Ringaskiddy lies, said there was nothing wrong or unusual in companies seeking to reduce their tax bills. "All companies will do what is in the best interest of its operations and shareholders," he said.

But Ed Kleinbard, Professor of law at the University of Southern California said the company's arrangements reflected "aggressive tax planning" and it seemed, from the outside, to be almost as capable in tax planning as pharmacology.

"This is a company that is investing heavily in tax research, as well as pharmaceutical research," he joked.

IRISH PROFITS Pfizer Ireland Pharmaceuticals is at the center of the drug company's tax-minimizing structure.

It is registered at a two-story 1970s era office block on the road into Ringaskiddy, a hamlet with two pubs and several factories operated by major drug manufacturers, a reflection of Irish government policy over the decades to create jobs in the area.

Pfizer licenses the rights to drugs developed in the United States and in other countries like Britain, to Pfizer Ireland Pharmaceuticals, according to accounts filed by the Dutch and Belgian parents of Pfizer's Irish units.

A manufacturing facility on the 200-acre Ringaskiddy site, which is bordered by green fields on one side and Cork Harbour on the other, produces active ingredients for drugs, based on formulas discovered by overseas affiliates.

It currently makes the active ingredients for Lipitor, anti-impotence drug Viagra, anti-lung cancer drug Xalkori and Ibrance, which fights breast cancer.

Pfizer also operates other factories across Ireland, and smaller operations in Singapore and Puerto Rico.

The compounds pass through a series of Irish companies which, like Pfizer Ireland Pharmaceuticals, have unlimited status meaning they do not have to publish accounts, a requirement of similar-sized limited companies in Ireland.

Reuters pieced together the Irish subsidiary's activities over the past 11 years from notes in the accounts of affiliates such as UK-registered Pfizer Ltd, Belgian registered Pfizer Research and Development Company NV and CP Pharmaceuticals International CV, the tax-exempt Dutch partnership through which Pfizer owns its overseas activities, including the Irish operations.

It also examined patent and public-health databases and spoke to three company executives.

Pfizer does have manufacturing plants in the United States but filings for its overseas units show non-U.S. companies supply over 80 percent of U.S. sales.

Those sales generate margins of around 40 percent for Pfizer's overseas arm - earning it over $17 billion in 2013. However, Pfizer has reported losses on its U.S. business in each of the past five years.

Pfizer said it follows the "arm's length" tax principle when conducting inter-company sales and purchases. This says companies should transact with affiliates at the same prices unconnected companies would.

However, academics say it is very hard to judge whether inter-company sales of unique products like patented chemicals, for which there is no independent open market, are conducted at prices that independent companies would agree to use.

"The current arm's length rules are always difficult to enforce because of the lack of a comparable price (in the drugs industry)," said Edmund Outslay, tax accounting professor, Eli Broad College of Business at Michigan State University.

U.S. COSTS

Many of Pfizer's group costs like research, debt and top management are mostly borne in the United States, despite non U.S. operations accounting for over 60 percent of global sales and 50 percent of hard assets like plants and property.

For example, Pfizer has $30-40 billion in long-term debt but only $12 million of it is borne by the overseas arm, filings for CP Pharmaceuticals International show.

The company said the practice of borrowing in the United States reflected lender preferences rather than any attempt to shift profits.

It added that it was natural for a U.S. company to bear a big share of its overhead costs in the United States.

But academics and campaigners are skeptical. "Pfizer maximizes the deductions it takes in the U.S. and maximizes the income it shifts to low-tax jurisdictions," Outslay said.

Pfizer denies its allocation of costs is an intentional ploy to cut taxes.

While it manages to report most of the profits generated by U.S. activity overseas, if it wants to take the overseas profits home, to pay dividends or fund buybacks, it has to pay the difference between the tax paid on the money – around 12.5 percent – and the U.S. tax rate.

Of $16 billion of U.S. income taxes Pfizer has paid since 2009, almost all reflects payments in relation to such remitting of profits from overseas subsidiaries, a Reuters analysis of group filings shows.

Even including this tax on remitted earnings, the amount of cash Pfizer pays in overall income taxes as a share of its profits is lower than rivals like Britain's GlaxoSmithKline (>> GlaxoSmithKline plc), Denmark's Novo Nordisk (>> Novo Nordisk A/S) and Paris-based Sanofi (>> Sanofi).

To avoid having to pay the tax due when cash is repatriated, Pfizer keeps most of its foreign earnings overseas and, indeed, much of it stays in Ireland.

In the capital, an office building near the mouth of the Liffey in Ringsend houses Pfizer's Dublin Treasury Centre, which the company says is responsible for treasury operations outside the United States and for helping manage Pfizer's offshore pile of cash on which no U.S. tax has been paid.

According to a presentation given by one of its staff last year, this unit overseas a cash mountain approaching $50 billion.

But if Pfizer does complete an inversion, the practice of stockpiling foreign profits in Dublin may no longer be necessary. That's because as an Irish-headquartered group it would be free to use its cash for dividends without incurring additional U.S. tax.

(Additional reporting by Ransdell Pierson in New York; Editing by Janet McBride and Pravin Char)

By Tom Bergin and Kevin Drawbaugh