U.S. Treasury Secretary Jacob Lew on Wednesday denounced the European Union's decision to order technology giant Apple to pay Ireland $14.5 billion in back taxes, saying the United States ought to be the beneficiary of the success of the world's most valuable company.

"I have been concerned that it reflected an attempt to reach into the U.S. tax base to tax income that ought to be taxed in the United States," Lew said of Tuesday's ruling by the EU's antitrust regulator.

Lew, speaking in Washington ahead of a meeting of the world's 20 leading economies in China, said, "Our concern with the European Commission action is that it is using a state-aid theory to make tax law and it is doing it in a way that is retroactive and that overrides national tax law authority."

Both Apple and Ireland announced plans to appeal the ruling, with Dublin voicing concern that the decision undercuts its efforts to position itself as a low-tax country that welcomes multinational corporations to open operations in the nation.

European regulators have also ordered the coffee store company Starbucks to pay more taxes to the Netherlands.

FILE - Apple Operations International, a subsidiary of Apple Inc, is seen in Hollyhill, Cork, in the south of Ireland May 21, 2013.

Failing ‘to stake a claim’

One former U.S. senator, Carl Levin, who oversaw congressional investigations of corporate tax avoidance schemes, said both Apple and the U.S. tax agency, the Internal Revenue Service (IRS), were ultimately to blame for the loss of revenue to the United States.

Levin said European authorities understandably wanted to tax the earnings for Apple, which manufactures the popular iPhones.

Levin, however, said, "The IRS has failed to stake a claim for U.S. taxes on those revenues for a decade or more. It has been passive and so Europe attempts to fill the vacuum. Shame on Apple for dodging U.S. taxes. Shame on the IRS for failing to challenge Apple's tax avoidance."

In issuing the ruling, the EU's competition commissioner, Margrethe Vestager said, "Tax rulings granted by Ireland have artificially reduced Apple's tax burden for over two decades, in breach of the EU state aid rules. Apple now has to repay the benefits." She questioned how anyone might think that Apple's 2014 Irish tax rate of 0.005 percent was fair.

Apple employs nearly 6,000 people in Ireland. Apple chief executive Tim Cook said he was "confident" the tax ruling would be overturned.