Donald Trump has long been an outspoken critic of Iran and its nuclear program, and has, in the past, condemned the 2015 nuclear deal as “one of the worst deals ever made by any country in history.” Now, it has emerged that the Trump Organization — the real estate group the GOP presidential nominee owns and manages — once had business ties with an Iranian bank later linked to terrorist groups and entities involved in the country’s controversial nuclear program.

According to public records perused by the International Consortium of Investigative Journalists (ICIJ) and the Center for Public Integrity, the Trump Organization rented office space in New York from 1998 to 2003 to Iran’s Bank Melli — an organization that the U.S. Department of the Treasury says “facilitated numerous purchases of sensitive materials for Iran's nuclear and missile programs.”

“From 2002 to 2006, Bank Melli was used to send at least $100 million to the Qods Force. When handling financial transactions on behalf of the IRGC [Iranian Revolutionary Guard Corps], Bank Melli has employed deceptive banking practices to obscure its involvement from the international banking system,” the Treasury Department said in 2007. “For example, Bank Melli has requested that its name be removed from financial transactions.”

According to court documents seen by ICIJ, Bank Melli paid over half a million dollars a year as rent on an 8,000-square-foot office space in the GM Building — a building Trump owned from July 1998 to September 2003. Trump Organization inherited Bank Melli as a tenant when it bought the building from Corporate Property Investors, and continued to rent out the office space to it for another five years. This means that even when the bank was listed by the Treasury Department in 1999 as an Iran-controlled entity subject to economic sanctions, it still maintained its New York office.

“It’s a pretty hypocritical position to take,” Richard Nephew, who served from 2013 to 2015 as principal deputy coordinator of sanctions policy at the U.S. State Department, told ICIJ. “It suggests that his [Trump’s] principles are pretty flexible when it comes to him getting paid.”

However, as ICIJ notes, the legal ramifications of the Trump Organization-owned office space being rented out to the Iranian bank are far from clear. This is because despite Iranian entities being forbidden from conducting banking transactions within the U.S., it is possible that Bank Melli may have been granted licenses exempting certain transactions from sanctions — although the Treasury Department has not revealed whether the bank was among the organizations that were granted such exemptions. The Trump campaign, the Treasury Department and Bank Melli when contacted by ICIJ journalists refused comment.

“We had any number of tenants in the GM Building,” George Ross, Trump Organization’s executive vice-president, told ICIJ in a telephone interview. “They might have been in there, but I have no knowledge of them.”