Sir Bob Geldof doesn’t take kindly to questions about his tax arrangements.

“I pay all my taxes. How dare you lecture me about morals,” the musician and anti-poverty activist reportedly replied to a journalist in 2012, after he was asked about his non-domiciled status in the UK. Geldof apparently then asked the reporter how many irrigation ditches her salary had built, before his entourage shuffled him away.

Two months later, Geldof claimed he was forced to be non-domiciled—a category of UK residents who don’t have to pay taxes on foreign earnings—since he was an Irish citizen. He also defended his tax-paying record: “I own the [TV] show Survivor. All the money comes into the UK. I could fucking park it in the Caymans. It comes in and I pay it,” he said. “My private equity fund, 8 Miles, is registered in the UK because I just couldn’t be arsed.”

Six months after that, 8 Miles, which invests exclusively in African startups, began setting up subsidiaries in Mauritius, a tax haven in the Indian Ocean that is roughly 6,000 miles from London. The company’s draft business plan, which was reviewed by Quartz, explains one of the main reasons for that: “Mauritius is an offshore jurisdiction with a wide network of double taxation treaties in interesting markets.”

8 Miles, it seems, was trying to avoid taxes that would have otherwise gone to the African governments and people the company aimed to help.

Geldof is a rock star who rose to fame as part of the 1970s Irish punk band The Boomtown Rats. He’s perhaps best known as the organizer of Live Aid, the huge music festival in 1985 that aimed to raise money for the Ethiopian famine. The year before, Geldof wrote the song “Do They Know It’s Christmas,” also a reaction to the famine. It became one of the most popular Christmas songs ever, despite its controversial lyrics.

Geldof’s humanitarian work in Africa, while altruistic, has often been criticized as shortsighted. The money raised by Live Aid, for instance, was mostly used by the Ethiopian dictator at the time to further crush his opposition, ultimately prolonging the country’s crisis.

Internal documents and emails now show that Geldof’s UK fund set up in Mauritius to benefit from a legal system that allows companies to take advantage of tax rates as low as 3%. Many of those benefits come from the controversial treaties mentioned in 8 Miles’ business plan. These agreements between Mauritius and 46 mostly poor countries allow multinationals to make money in states like Uganda—where they would be subject to much higher taxes—but book those profits in Mauritius.

The 8 Miles documents were among a trove of some 200,000 confidential records belonging to the former Mauritius office of Bermuda-based offshore law firm Conyers Dill & Pearman that was was leaked to the International Consortium of Investigative Journalists (ICIJ) and shared with dozens of journalists around the world, including reporters at Quartz. The resulting investigation, dubbed the Mauritius Leaks, provides a glimpse into how foreign companies and investors have been able to take advantage of the former French colony’s tax code to profit at the expense of the very places funds like Geldof’s purport to help.

“One little wad of cash can be the difference between a poor country building big infrastructure or not,” a Ugandan tax official told ICIJ.

REUTERS/Darrin Zammit Lupi A fishing boat off the east coast of Mauritius.

Geldof’s fund is invested in eight companies, including a Ugandan chicken farm, an Egyptian chemicals manufacturer, and an Ethiopian vineyard. Were it to make profits from those companies and pay dividends to investors in the UK, that money would normally be subject to a withholding tax if paid straight from those countries to Britain. But if 8 Miles first sends the investment to Mauritius, it pays no withholding tax at all, Tommaso Faccio, a former Big 4 accountant and lecturer at Nottingham University Business School, told Quartz.

Similarly, when 8 Miles finally sells the shares in its investments, it would normally have to pay capital gains taxes on the difference between the price it originally paid for those shares and the amount it sold them for, but it avoids that thanks to the Mauritius dog-leg, said Faccio, who is also head of secretariat at the Independent Commission for the Reform of International Corporate Taxation, an organization working toward global tax reform.

Investing in African companies but avoiding its fair share of tax responsibilities seems to contradict both Geldof and 8 Miles’ central mission. The investment fund says it invests by the “8 Miles code,” which promises to “contribute to the economic development of the countries in which the Fund invests.” Faccio points out, however, that 8 Miles is investing in countries that rely on corporate taxation far more than Western states. “Some of these countries are the poorest in the world, so this system takes away resources that can support their welfare system,” he said.

It is unclear how much tax 8 Miles avoided through its offshore structure, but in filings made with UK financial authorities the fund has said its “principal objective” is “creating capital growth and realizing capital gains.” In other words, its Mauritian structure allows it to avoid tax on its primary business goal.

In response to the investigation, a spokesman for 8 Miles said the fund creates jobs, which generates tax revenue and supports the governments where it operates.

“The companies we invest in, pay all taxes in their home jurisdiction in Africa,” the spokesman said, adding that any double-tax agreements are made by the governments involved, not the fund. “Only when we sell a company will the sale proceeds be paid back into the fund in Mauritius.”

An official response from the Mauritanian government insisted its double-taxation agreements do not harm other African countries, and that the island nation follows accepted international accounting standards. “We also wish to put on record that there are mechanisms in place to track any malpractice or abuse and we believe that our system has worked well so far,” a spokesperson said.

The success of those efforts are disputed, however.

“The main reason for double tax agreements is to ensure that companies are not being taxed twice,” Alvin Mosioma, executive director of Tax Justice Network Africa, told ICIJ. “But largely what they end up achieving is double non-taxation.”

Read more of Quartz’s reporting on how the Mauritius Leaks expose global tax avoidance.