The Isle of Man passed a law that would help tax evaders, documents in the Paradise Papers show.
Lawyers promoting a scheme allowing Swiss bank clients to hide their cash offered to help the authorities amend rules in November 2004.
The law was changed seven months later, amid an EU clampdown on tax dodging.
BBC Panorama has spoken to the man behind the scheme who claims an Isle of Man regulator was aware the new law would help tax evaders.
Mark Morris, a tax adviser and leading expert on tax loopholes, told the programme regulators in offshore territories used to regularly help financial institutions in this way.
"I think in those times, it was wrong, and there were regulators helping financial institutions," he said.
"But today, this would never be allowed."
'Doesn't seem ethical'
Mr Morris devised the scheme to help wealthy clients avoid the European Union Savings Directive (EUSD).
The EUSD was introduced in 2005 to stop people from within one part of Europe putting assets in an account in another country without declaring it. Most of the people targeted by EUSD were therefore already evading tax.
The idea was that EU-based banks and those in other nations including Switzerland would make automatic deductions for tax from interest payments.
Mr Morris's scheme was designed to be exempt from the reach of the EUSD. It involved Swiss bank deposits being moved into a redeemable insurance product sold by a new Isle of Man company, Minerva Assurance Ltd.
The draft of an agreement with an unnamed bank says of the proposals: "Policy applications and surrenders are transacted expeditiously.... Confidentiality is maintained, as the individual client is not directly involved."
'Get in touch'
The leaked documents outline events in late 2004 when lawyers acting for Mr Morris held talks with the IoM insurance and pensions regulator, David Vick.
After it became clear that the new insurance company would not be authorised to operate under existing laws, they appear to have offered to help Mr Vick draft new regulations.
A letter they wrote to Mr Vick in November 2004 after their discussions asks him to get in touch "if you believe it would be helpful for us to provide you with ideas as to how to improve the regulations to more readily accord with our client's proposal".
Mr Vick then emailed them in March 2005 to say a consultation was to take place about proposed changes to the 1986 Insurance Act. He tells the lawyers he would "be particularly interested in any comments that you… have in this regard".
On 17 May 2005, amendments were approved by the IoM parliament, known as the Tynwald, and they took effect on 1 June 2005 - exactly a month before the EUSD began.
Mr Vick retired from the IoM's Insurance and Pension Authority in 2015. Approached about the events, he declined to answer any questions and referred the BBC to the Isle of Man authorities.
The Isle of Man's Chief Minister, Howard Quayle, says the island is a "responsible jurisdiction" and complies with international regulations on tax transparency.
He said the events surrounding the insurance scheme would be investigated but he did not believe the regulator at the time would have knowingly helped to create a law to facilitate tax evasion.
Mr Quayle told Panorama: "If it had happened I would be incredibly disappointed. Give me the opportunity to look at the evidence first and then we'll take action if it is proven."
Mark Morris said he had acted within the law and described the financial structure he devised as one of "many loopholes" available at the time. He said that "nine times out of 10" the investors would have been intending to evade tax.
In the end, the tax dodge was never used because Mark Morris was unable to recruit enough clients.
He said: "Nobody utilised this plan because there were so many other solutions."
Mr Morris later gave evidence to the German parliament on EUSD and helped the European Commission with reform of the rules.
The papers are a huge batch of leaked documents mostly from offshore law firm Appleby, along with corporate registries in 19 tax jurisdictions, which reveal the financial dealings of politicians, celebrities, corporate giants and business leaders.
The 13.4 million records were passed to German newspaper Süddeutsche Zeitung and then shared with the International Consortium of Investigative Journalists (ICIJ). Panorama has led research for the BBC as part of a global investigation involving nearly 100 other media organisations, including the Guardian , in 67 countries. The BBC does not know the identity of the source.
Paradise Papers: Full coverage ; follow reaction on Twitter using #ParadisePapers; in the BBC News app, follow the tag "Paradise Papers"
Watch Panorama on the BBC iPlayer (UK viewers only)