Goldman Sachs, Citigroup, Merrill Lynch and other international banks have profited for years by arranging short-term loans of stock in Danish companies, a maneuver that has helped shareholders but deprived Denmark of substantial tax revenues.

With the banks’ help, stock owners avoid paying Danish authorities the dividend taxes they would otherwise owe on their holdings of companies like Maersk, Novo Nordisk, Danske Bank, Tryg and Carlsberg, among others.

They do so by lending the shares to banks that temporarily transfer them to other investors with low or no tax obligations around the time when the dividend is paid. The terms are hedged and arranged months in advance. After dividend time, the borrowed shares are returned, and the tax savings are shared among the investors and banks that arranged the trades.

The maneuver — known as dividend arbitrage, or “div-arb” — cost Denmark about 400 million Danish crowns ($60 million) in lost taxes last year alone, according to an estimate that we asked CEPOS, a Danish think tank, to provide for this article

For a country of 5.7 million, the lost revenue is significant: It equals roughly 1.1 percent of the budget deficit of the Danish government last year, or about 70 Danish crowns ($10) for each resident.

The tax-avoidance trades are detailed in confidential documents that ProPublica examined in collaboration with the Danish business daily Børsen. The documents include trade logs, emails, chat messages and marketing materials that show how such trades happen in Denmark and various other countries.

For the first time, the documents reveal who is engaged in this kind of tax avoidance, which has already drawn scrutiny from regulators and lawmakers in Germany as they try to prevent future losses to taxpayers.

The documents make clear that the trades – which are also known as “yield enhancement” – are conducted for the purpose of avoiding dividend taxes.

One client memo describes yield enhancement as a short-term loan of shares owned by a tax-liable shareholder to another investor with a lower rate of withholding or no tax at all. The tax-exempt investor gets the dividend tax-free or is able to claim a refund from tax authorities. The difference between what would have been owed and what was actually paid is then “split between the lender and the borrower,” the memo says. In another document, the trades are described simply as a method to “recapture” dividend taxes.

The papers disclose the specific Danish shares used in these trades. For instance, in April 2014, U.S. investment fund manager Vanguard lent 1,750 shares of shipping company Maersk with a market value of more than $20 million to unknown investors through Goldman Sachs and Merrill Lynch.

These share loans lasted no longer than 14 days, during which Maersk, one of Denmark’s largest corporations, paid out 280 Danish crowns ($41.6) per share in dividends. Because the Vanguard funds are based outside of Denmark, they would normally lose 27 percent of the dividend to taxes, and thus receive only 73 percent of the total dividend. That comes out to 204.4 Danish crowns ($30.3) per share. Lending the shares allowed the Vanguard funds to avoid paying the dividend tax, saving 75.6 Danish crowns ($11.3) per share.

Altogether, that comes to a loss of 132,300 Danish crowns to Denmark ($19,642). Of that amount, the Vanguard funds got to keep about 77,800 in tax savings they wouldn’t otherwise get and the remaining 54,500 crowns went to large banks and the unknown investors who participated in the deal. Only Danish taxpayers lost.

Wall Street Stock Loans Drain $1 Billion a Year From German Taxpayers Carefully timed deals help big money managers skirt dividend taxes in 20 countries, confidential documents show. Read the story. Help Us Investigate Do you have a tip or documents about who helps investors avoid dividend taxes? You can confidentially share records with us using our SecureDrop system.

When Danish companies pay out dividends each spring, hundreds of these trades are arranged by various international banks representing lenders and borrowers of shares. Big baskets of various Danish stocks or individual stocks with attractive dividends are assembled by bankers and put out for bidding to various counterparties, documents show.

Vanguard declined to comment for this story, but the company has previously told ProPublica that “securities lending is a widely accepted practice that we prudently employ to augment fund returns to the benefit of our clients.”

Goldman Sachs and Merrill Lynch declined to comment.

Besides Goldman Sachs and Merrill Lynch, other banks that participate in Danish div-arb deals include Deutsche Bank, UBS, JPMorgan and Citigroup, according to the documents.

The banks declined to comment except for Deutsche Bank, which said its transactions follow all applicable tax laws and reporting obligations in the countries where the bank operates.

The div-arb deals in question only involve refunds of taxes which had actually been withheld. Last year, the Danish public was shaken when Danish tax authorities disclosed they had paid out billions of crowns in refunds for dividend taxes that had never been paid. Those transactions prompted the Danish government to launch fraud investigations and halt processing refunds of taxes paid on dividends.

Under heavy scrutiny, the refunds slowly started again in March. But it’s unclear whether sufficient safeguards have been put in place against div-arb trades as authorities seem unaware of transactions like the ones reviewed by ProPublica and Børsen.

The Danish Ministry of Taxation said in an email that it “is not aware of such practice at this point,” but that it is “currently investigating” banks’ share lending activities with a subsidiary agency known as SKAT, the Danish Tax Authority.

A working group convened by the regulators recently concluded that the borrower of a share is not entitled to a tax reclaim, casting doubt on the legality of any form of div-arb trades in Denmark.

Danish courts agree. The Danish National Tax Tribunal – the highest administrative court for tax matters in Denmark – ruled in 2004 that lending of a share does not change the fact that the original owner is obliged to pay the dividend tax.

“Taxwise, we have to maintain that the lender basically remains the owner of the shares. So, if the lender’s tax rate is 27 percent, then 27 percent should be withheld in taxes. That’s the case law in Denmark,” says Erik Banner-Voigt, partner in the Danish law firm Bruun & Hjejle and a specialist in international tax law.

In May ProPublica revealed similar transactions in Germany together with Handelsblatt, German broadcaster ARD and The Washington Post. ProPublica conservatively estimated div-arb cost German taxpayers about $1 billion a year. Afterwards, Germany’s Commerzbank – which had been bailed out by taxpayers during the financial crisis – promised to stop facilitating div-arb trades. The decision came as the Frankfurt general prosecutor’s office opened an investigation into the bank’s activities.

“We are pulling out of this legal business because it is no longer socially accepted,” Commerzbank board member Michael Reuther said in an interview with Germany’s Bild newspaper.

In June, German lawmakers passed a law that effectively shut down div-arb in Germany, which had been the biggest market for such deals.

But it’s still possible to book such deals in many other markets, including, it seems, Denmark.

The Danish State Lost a Fortune in Record Maersk Dividend

Though the individual sums may seem small, there is a lot of money involved in div-arb deals, especially for big corporations like Maersk.

On April 7, 2015, Maersk paid out 1,971 Danish crowns per share ($293) to its investors in two payments that together added up to one of the biggest dividends in Danish history. The massive payment followed the sale of the conglomerate’s stake in Danske Bank.

A few days before the dividend was paid out, 1.3 million Maersk shares were on loan, according to data from S&P Global Market Intelligence – apparently with the sole purpose of avoiding the Danish withholding tax.

Altogether, around 6 percent of Maersk’s shares were on loan when the dividend was paid out to shareholders of record. The amount was unusually high: Less than 0.5 percent of the shares were on loan in the three months before and after the dividend payment, stock lending data from S&P shows.

“The best explanation is, that it has to do with taxes,” says Otto Brøns-Petersen, former director at the Danish Tax Ministry and now head of research at CEPOS, the Danish think tank.

Denmark lost 350 million Danish crowns ($52 million) in tax revenue because of the Maersk share loans, according to a CEPOS estimate for Børsen based on the S&P data.

The Maersk shares were not the only ones on loan over the dividend record date, when shareholders are identified for payment. In 2015, similar surges are visible in biotech giant Novozymes, jewelry maker Pandora, wind turbine producer Vestas, insurance provider Tryg and others, S&P stock loan data for Denmark’s top 20 most-traded stocks shows.

Altogether, CEPOS estimated that Denmark lost 400 million crowns ($60 million) because of dividend arbitrage in 2015. CEPOS’s Brøns-Petersen said several assumptions used to craft the estimate could make the figure higher or lower.

S&P would only provide a tally of shares on loan in any security as of the first of each month, making it impossible to identify spikes in lending for companies that pay dividends later in the month. Because of this, some of the potential losses do not show up in the analysis.

The estimate also assumes a tax rate of 15 percent on dividend payments, which is only available to foreign investors covered by tax treaties with Denmark. Investors not covered by such treaties can avoid a 27 percent tax bill by lending out their shares around dividend time.

“It is likely a low estimate,” Brøns-Petersen said.

‘Everyone Knows It Is About Taxes’

Investors like Vanguard say they don’t seek out div-arb transactions: They simply make shares available for borrowing and let market demand drive activity. The goal is to earn extra income in the form of lending fees from shares of stock Vanguard is holding for clients in its vast array of mutual funds.

“We are not proactively and systematically identifying dividend-paying stocks and shopping them to borrowers before a dividend payment,” a Vanguard spokesman previously told ProPublica in regard to German div-arb deals. “Vanguard is a passive lender; our funds lend only in response to market demand from brokers with the goal of seeking to augment returns for our shareholders.”

Børsen showed examples of the trades to Torben Bagge, a prominent tax attorney at the Danish law firm Tommy V. Christiansen. Bagge said taxes appear to be a motivation for deal participants.

“The excerpts of the material I have seen suggest that what they think about is tax,” he said. “It is worrying that reputable banks and firms seem to assist in organized tax speculation against the Danish treasury.”

One former employee who arranged div-arb deals at a major bank in Denmark said “everyone knows it is about taxes.” Competition for customers puts pressure on bankers to arrange the deals or risk losing business, he said: “If everyone else is doing it and getting a risk-free return each year, the other managers are forced to do it as well.”

The employee, who spoke on condition of anonymity to protect his current position in the financial sector, said div-arb has been taking place in Denmark for at least ten years. Over time, that means small amounts of tax revenue lost on each deal could have added up to big losses for Denmark.

But just as those small amounts matter to Danish taxpayers, banks also care about every penny of revenues they can derive from the trades.

Last year, for example, revenues from Danish div-arb deals fell at one bank. The flagging revenues prompted a senior executive to ask his traders to aggressively book trades to capture what amounted to less than half a million dollars in additional revenues, an email shows.

The executive wrote to his traders: “We cannot leave any revenue on the table.”