A massive unfolding corruption scandal in Turkey—which has already forced the resignations of three government ministers and threatens to upend the Islamist government of Prime Minister Recep Tayyip Erdogan— is fast acquiring an international dimension amid accusations that Iran is enmeshed in Ankara’s political crisis.

What started out as a domestic scandal involving shady real estate deals and allegations of bribery and kickbacks among the Erdogan government and its business allies is now expanding, with major international ramifications. Among the potential repercussions, analysts say: a potential destabilization in the delicate negotiations underway between the West and Iran over Tehran’s nuclear program.

The first hint of the Iranian angle in the corruption probes launched by Turkish police in the face of government obstruction came before Christmas when a complicated oil-for-gold deal between Turkey and Iran was unmasked. The investigators didn’t set out to uncover the sanction-busting oil deal but say they were led to it by following a trail of cash bribes.

An Iranian businessman and gold dealer, Reza Sarraf (also known as Reza Zarrab), whom police have accused of bribing the Economic Minister while organizing transactions from Iran worth $120 billion, was arrested last week. So, too, the CEO of the state-owned Turkish financial institution Halkbank, who was reportedly found to have more than $4 million of cash stuffed in shoe-boxes in his home.

According to Turkish investigators, both men were at the center of a complex deal in which Iran sold oil and natural gas to Turkey for cash payments that were deposited in an account held at Halkbank. In order to circumvent international money-transfer sanctions on Iran, the cash deposits were then allegedly converted into gold that Turkey exported to Tehran, often via Dubai. Police reports filed with Turkish prosecutors estimate that in the past three years alone, $8 billion in gold was transferred to Iran. American analysts say. ] the number could be higher, to the tune of $13 billion between March 2012 and July 2013 alone. (In July 2013, the U.S. and the European Union tightened loopholes on a ban on gold exports to Iran.)

In a statement to the Istanbul bourse, Halkbank stated that all its business transactions with Iran have been transparent and legal, and that it stopped exporting gold to Tehran in June 2013.

The broad outlines of the oil-for-gold deal has been known for some time—in April,47 U.S. lawmakers called on Secretary of State John Kerry and Treasury Secretary Jack Lew to sanction Halkbank for its gold trade with Iran.

Public exposure of Iranian maneuvering to evade UN sanctions is likely to rile U.S. lawmakers opposed to the ongoing negotiations between Washington and Tehran and could complicate President Barack Obama’s selling of an interim deal that would see some sanctions lifted in return for Iran freezing some aspects of its nuclear program. The interim deal is meant to lead to a resolution of the long-running nuclear dispute. That dispute led to the United States and European Union to imposing crippling economic sanctions to supplement UN ones over suspicions that Tehran aspires to develop nuclear weapons—something Iran’s leaders deny.

Bipartisan legislation was introduced in the U.S. Senate earlier this month that would authorize new economic sanctions on Iran if it breaches an interim agreement to limit its nuclear program or fails to strike a final accord.

Last week, as the Iranian dimension to the Turkish scandal started to emerge, David Cohen, the U.S. Treasury’s Undersecretary of Terrorism and Financial Intelligence, visited Turkey and reportedly urged the Turks to observe international sanctions on Iran, notwithstanding the progress being made on nuclear negotiations.

Since Cohen’s visit, the Turkish Prime Minister and his political allies have claimed that the U.S. and Israel engineered the political crisis raging in Ankara. And Erdogan has threatened to send U.S. ambassador Francis Ricciardone packing for engaging in unspecified “provocative action.”

Behind the scenes, Western diplomats say they have urged Turkish officials to restrain their language and to stop casting the unfolding graft scandal as a “foreign plot.” Erdogan has lashed out before when facing domestic turmoil by accusing the West of plotting his downfall, notably in the summer during the streets protests in Istanbul’s Gezi Park.

But analysts say the Halkbank oil-for-gold deal may only be start of more uncomfortable disclosures about Iranian dealings in Turkey. One of every six companies that began investment in Turkey last year was backed by Iranian capital, the Turkish daily newspaper Habertürk reported recently. The latest official Turkish government data reported that in 2011, there were 2,072 Iranian firms operating in Turkey, a big jump form the year before when there were 1,470. In 2002 there were only 319 Iranian firms in the country.

Earlier this year Iran reportedly placed $7-8 billion in cash in a Dubai-based fund earmarked for investment and the acquisition of companies in Turkey.

In a paper for the Crown Center for Middle East Studies at Brandeis University, Mideast expert Nader Habibi argued that “one of the main reasons that the Islamic government of Iran has been so eager to expand its ties with Turkey is the escalation of international and unilateral sanctions applied against it in recent years.” He maintained “Iran views Turkey as a valuable partner for neutralizing the international economic sanctions and reducing her international isolation; and by deepening its economic interdependency with Turkey, Iran is also trying to discourage Turkey from supporting the sanctions itself.”

One of the benefits for Iranian firms of operating from Turkey is they are able to trade in European markets—which is often impossible when operating from inside Iran because of the sanctions, notes Emanuele Ottolenghi, a Senior Fellow at the Washington DC-based think tank the Foundation for Defense of Democracies. He says the hundreds of Iranian firms in Turkey are connected to “extensive global networks of Iranian-controlled companies involved in shipping, the gold trade, prepaid credit card sales, money transfer services and tourism industry services, including aviation and the purchase and sale of aircraft.”

Many of these companies were acquired or founded by former Iranian officials who had few financial resources of their own on leaving government service, Ottolenghi says. Among those officials-turned-entrepreneurs is the British-based Mehdi Shamszadeh, normally uses the surname Shams. A former senior official of the state-owned Islamic Republic of Iran Shipping Lines (IRISL), he acquired the low-cost, private Turkish airline Onur Air in May 2013 for $250 million and runs several maritime companies that conduct trade with other businesses operated by former IRISL officials.

The U.S., UN, and EU have sanctioned IRISL for its role in advancing Iran’s nuclear and ballistic missile programs.

In 2006, Shams incorporated two companies in Britain with Ali Ashraf Afkhami, who at the time was chairman of IRISL. Afkhami is now chairman of Karafarin Bank, a private bank controlled by Iran’s Supreme Leader, Seyed Ali Khamenei, through holding companies. He sits on the bank’s board as a representative of Tadbir Investment Co., a subsidiary of the U.S.-sanctioned EIKO, a foundation that runs the Khamenei’s economic empire.

In September, Zaman Today newspaper reported that Mehdi Shams bought Onur Air on behalf of Babak Zanjani, an Iranian billionaire who has been sanctioned by the U.S. for “moving billions of dollars on behalf of the Iranian regime, including tens of millions of dollars to an Islamic Revolutionary Guards Corps company,” according to the U.S. Treasury Department.

On Wednesday, Zanjani denied involvement in Turkey’s corruption scandal, saying in a post on his company’s website that his business in the country is completely legal. He said that he had had some limited dealings with Reza Sarraf, the businessman allegedly at the center of the Halkbank oil-for-gold deals, but said he was not aware of Sarraf’s activities.

Turkish prosecutors say that Sarraf described Zanjani to police interrogators as “my chief.”