Jürgen Mossack was already a citizen of the world when he first hung his shingle in Panama City in 1977. Born in Germany and raised and educated in Panama, the twenty-something had gone to London to work as a lawyer in 1975, but he returned two years later and began practicing. Since then, the firm he founded has become a global behemoth—hundreds of employees spread around the world, with special expertise in creating tax shelters for wealthy global elites. The firm is also, according to documents in the “Panama Papers,” deeply involved with all manner of unsavory and possibly illegal practices across continents; though Mossack Fonseca itself has strenuously denied any allegations of wrongdoing.

The enormous document leak, reported by Süddeutsche Zeitung, the International Consortium of Investigative Journalists, and others worldwide, offers a new view of Mossack Fonseca, the firm that Jürgen Mossack established. The leak consists of a stunning 2.6 terabytes of data, dating back to 1977. The documents purport to show Mossack Fonseca’s dealings with world leaders, company officers’ internal discussions about court cases, and communication about sheltering money obtained through crimes.

The Panama Papers put a much greater focus than ever before on a firm whose stock in trade is maintaining opacity for its clients—a strategy it has pursued for itself. Even within the world of attorneys who create shell corporations, Mossack Fonseca has been described, by The Economist in 2012, as “tight-lipped.” But a silhouette of the firm’s history can be drawn from reports and court cases over the years.

Mossack himself reportedly comes from a colorful family. His father, Erhard, moved the family to Latin America after World War II. The ICIJ reports that Erhard Mossack served in the Waffen-SS during the war. According to the ICIJ, U.S. intelligence files show he offered to spy for the U.S. government, possibly simply to shield himself. He later offered to spy for the CIA, from Panama, on Communists in Cuba. Süddeutsche Zeitung reports that Germany’s Federal Intelligence Service declined to hand over documents relating to Erhard Mossack due to possible security risks.

Jürgen Mossack’s practice only became Mossack Fonseca in 1986, when it merged with the tiny firm run by Ramón Fonseca, a Panamanian novelist, lawyer, and politician.

“Together,” Fonseca once reportedly told a journalist, “we have created a monster.”

That same year, 1986, according to the Panama Papers, Mossack learned he was involved in a front company for men who had robbed 3.5 tons of gold—£26 million at the time, and more now—from a Brink’s-Mat depot near London’s Heathrow Airport in 1983. “The company itself has not behaved illegally,” Mossack wrote in a memo copied to Fonseca. “But it could be that the company invested money through bank accounts and properties that was illegitimately sourced.” Instead, MF served as legal advisers to a new shell company created for Gordon Parry, who was on the lam and later served 10 years in prison for laundering money from the robbery. London’s Metropolitan Police had seized shares in the previous shell company, but under Mossack’s tutelage, The Guardian reports, Parry was able to outfox police by diluting the seized shares, then reconstituting the company.

That trick involved “bearer shares,” which seem to have become something of a MF specialty. A bearer share grants control of an instrument or company directly to whoever possesses a physical certificate. The ownership is not recorded or registered anywhere else. Bearer shares are banned in some countries because of the high potential for fraud and money laundering.

One place where MF took advantage of the possibilities posed by bearer shares was the British Virgin Islands. MF first expanded there in 1987; the BVI are now home to 40 percent of the world’s offshore companies, according to some counts. According to the Panama Papers, MF’s use of the tool grew steadily through the 1990s. But in 2005, the BVI cracked down on bearer shares, so MF simply switched that business to Panama. While MF’s use of bearer shares spiked sharply at home around that time, it since appears to have declined significantly.

MF has always been relatively open about its work creating tax havens. On its website, the firm advertises expertise in jurisdictions including “Belize, The Netherlands, Costa Rica, United Kingdom, Malta, Hong Kong, Cyprus, British Virgin Islands, Bahamas, Panama, British Anguilla, Seychelles, Samoa, Nevada, and Wyoming (USA).” (Nevada and Wyoming are notorious among U.S. states for their loose regulatory regimes; in 2011, a professor told Reuters, “Somalia has slightly higher standards than Wyoming and Nevada.”)

In 2001, Ramses Owens, a top MF lawyer, spoke on the Isle of Man—itself a tax haven—to drum up business. “I would maintain that Panama is one of the world's best kept secrets in terms of its long established and sophisticated financial regulatory system,” he said. “Because Panama has much to offer, I decided to set the record straight and embark on a series of presentations.” Owens spoke along with an MF lawyer based on the isle and another based on the Channel Island of Jersey—yet another tax shelter. (“Ramses also likes to break into a little salsa to liven up the proceedings,” a reporter with the Isle of Man Courier noted.)

MF has had its share of legal and regulatory troubles abroad, even before the wave of investigations likely to follow on the Panama Papers. In 2012 and 2013, BVI regulators fined the company for violating money-laundering protections on several occasions, including one involving the son of toppled Egyptian dictator Hosni Mubarak. In the mid-1990s, MF helped the tiny South Pacific atoll of Niue establish itself as a magnet for offshore companies. “Importantly, Niue offered registration in Chinese or Cyrillic characters, making it attractive to Chinese and Russian customers,” ICIJ notes. But after the State Department suggested Niue was a center for money laundering and several banks quit doing business there, MF’s relationship with the government cooled.

Even as it encountered problems overseas, MF remained in good stead at home—a fact that wasn’t simply a product of its size or legal acumen. The company also had close political ties through Ramón Fonseca. Fonseca is something of a renaissance man: In addition to this work as a lawyer, he has also published several novels, two of which won the Ricardo Miró Prize, a national literary award. When Panamanian President Juan Carlos Varela entered office in 2014, Fonseca was named an adviser. He was also acting president of Varela’s political party.

Still, authorities were scrutinizing MF around the world. In a 2014 feature for Vice, Ken Silverstein traced the bank’s connections to Rami Makhlouf, a wealthy Syrian businessman and a cousin and close associate of President Bashar al-Assad. From 2000 to 2011, MF was the registered agent for Drex, a shell company Makhlouf used in the British Virgin Islands. MF also dealt with alleged “bagmen” for dictators including Zimbabwe’s Robert Mugabe and the late Muammar Qaddafi of Libya.

In 2015, MF’s cozy links to several large banks became troublesome. HSBC CEO Stuart Gulliver admitted he had put some of his money in a Panamanian shell company created for him by Mossack Fonseca, a move he said he undertook for privacy. German authorities raided homes and an office of Commerzbank in Frankfurt in spring 2015, and reportedly told journalists they were considering charges against MF employees over tax evasion.

And in the U.S., MF was caught up in another arcane battle. An American hedge fund has been seeking to recoup billions from Argentina after a government default in 2001. (That story, involving escapades like the seizure of an Argentine naval ship in Ghana, is worth reading up on as well.) Tracking down allegedly laundered money, the plaintiff hedge funds ended up in Nevada. The plaintiffs sued MF and its local affiliate, MF Nevada, seeking information. But the Panamanian parent company claimed—somewhat laughably—that MF Nevada was not affiliated with it but simply engaged in business with Mossack Fonseca. MF Nevada’s primary employee was Patricia Amunategui, a former cocktail waitress.

The Panama Papers show Mossack Fonseca employees speculating worriedly about whether Amunategui was capable of testifying without giving up the game. In the end, a judge ruled in favor of the hedge funds and against MF.

Meanwhile, in Brazil, MF is caught up in the corruption scandal that threatens to topple President Dilma Roussef’s government. In that scandal, dubbed “Operation Car Wash” or “Lavo Jato,” contractors are alleged to have conspired to drive up the price of contracts from Petrobras, the powerful state oil company, while paying kickbacks to politicians and executives. MF is alleged to have helped some of the defendants set up operations to launder their money from the scheme. In March, Fonseca resigned his posts as presidential counselor and party chair, vowing to defend his honor.

Now, with the huge leak of the Panama Papers, Fonseca and Mossack will have a much greater task ahead of them in mounting that defense. It seems Fonseca was right that the two lawyers had created the monster. Now they will have to find a way to keep it from devouring its creators.