Tony and Cherie Blair did not have to pay £312,000 in stamp duty when buying a £6.45m London townhouse, leaked documents show.
The ex-Labour prime minister and his barrister wife bought the property as an office for her business in 2017 by buying the offshore firm that owned it.
Mrs Blair said the sellers had insisted the building was sold in this way but they had brought it under UK control.
She said they would be liable to pay capital gains tax if they sell it.
When the property was put up for sale, the ultimate owners were a family with political connections in Bahrain - but both parties say they did not initially know who they were dealing with.
Mrs Blair said her husband's only involvement in the transaction was that the mortgage for the property used their joint income and capital.
The revelation is contained in the Pandora Papers, a leak detailing the work of companies offering offshore financial services in the British Virgin Islands, Singapore, Panama, Belize, Switzerland and other countries.
BBC Panorama in a joint investigation with the Guardian and other media partners have had access to nearly 12 million documents and files.
Since leaving Downing Street in 2007, the Blairs have built up a significant property portfolio. Altogether they are reported to have spent more than £30m on 38 residential properties before they bought the office.
Documents show how the way the property in Harcourt Street, Marylebone, was acquired in July 2017 saved the Blairs a bill for stamp duty.
The four-floor building is now home to Mrs Blair's legal advisory firm, Omnia Strategy, and her foundation for women.
The previous owner of Harcourt Street is listed in UK Land Registry records as Romanstone International Limited - a British Virgin Islands firm.
Romanstone itself had been owned by another BVI company, whose shareholders were members of the Al Zayani family. Among them was a minister in Bahrain's government - Zayed Rashid Al Zayani, Bahrain's minister for industry, commerce and tourism.
The leaked documents show the Blairs bought the building by setting up a UK company to acquire Romanstone. Mr and Mrs Blair each held a 50% stake in the British company. They closed the offshore company after the purchase.
Buying the property in this way meant the Blairs did not have to pay stamp duty.
Stamp duty is paid by the purchasers of a property or land over a certain price.
The tax is not paid when a company owning a property is acquired because the shareholder of a company is switching hands, rather than the actual ownership of the property.
No laws were broken in buying the Harcourt Street office but Mr Blair had previously been critical of tax loopholes, once saying "the tax system is a haven of scams, perks, City deals and profits".
In his first speech as Labour leader in 1994, Mr Blair said: "Millionaires with the right accountant pay nothing while pensioners pay VAT on fuel.
"Offshore trusts get tax relief while homeowners pay VAT on insurance premiums. We will create a tax system that is fair which is related to ability to pay."
Robert Palmer from campaign group Tax Justice UK told Panorama: "It partly doesn't look great because most people cannot do the same thing… even if what the Blairs did was perfectly legal, perfectly legitimate in the business world, it feels instinctively really unfair because they got access to an advantage, a potential advantage that the rest of us don't have."
Mrs Blair stressed that Harcourt Ventures had been formed to bring Romanstone and its building under UK tax and regulatory rules.
She said: "It is not unusual for a commercial office building to be held in a corporate vehicle or for vendors of such property not to want to dispose of the property separately."
The Blairs said "the acquisition of a company comes with different tax consequences" and they "will of course be liable for capital gains tax on resale".
Lawyers for the Al Zayani family say their companies have complied with all UK laws past and present.
The Pandora Papers is a leak of almost 12 million documents and files exposing the secret wealth and dealings of world leaders, politicians and billionaires. The data was obtained by the International Consortium of Investigative Journalists in Washington DC and has led to one of the biggest ever global investigations. More than 600 journalists from 117 countries have looked at the hidden fortunes of some of the most powerful people on the planet. BBC Panorama and the Guardian have led the investigation in the UK.
Pandora Papers coverage: follow reaction on Twitter using #PandoraPapers, in the BBC News app, or watch Panorama on the BBC iPlayer (UK viewers only)