Donald Trump's real estate organization did business with an Iranian bank that U.S. authorities have linked to terrorist group's and Iran's nuclear program.

Bank Melli, one of Iran's largest state-controlled banks, was already a tenant in 1998 when Trump purchased the General Motors Building in Manhattan, but he kept them on for another five years, until 2003, reported The International Consortium of Investigative Journalists.

U.S. officials later accused the bank of helping to obtain sensitive materials for Iran's nuclear program, and American authorities believe Bank Melli was used between 2002 and 2006 to funnel at least $100 million to the Quds Force unit of the Iranian Revolutionary Guard that has sponsored terrorist attacks.

The news organization reported that Bank Melli may have paid more than $500,000 in yearly rent for 8,000 square feet in the GM Building, but it's not clear whether Trump's organization broke any laws by doing business with the Iranian-controlled bank.

A report last week showed a company controlled by Trump secretly conducted business with Cuba while U.S. sanctions were in place.

The U.S. had an embargo in place during that time prohibiting Americans from conducting business with Iran, including accepting rent payments, but some of the nation's organizations were granted licenses exempting certain transactions from the sanctions.

If the rent payments were licensed, the ICIJ reported, it might have been difficult for the Trump Organization to legally evict the bank, which moved out sometimes after 2003.

Regardless, the business arrangement calls Trump's principles into question.

The Republican presidential nominee has described Iran as a "big enemy" on the campaign trail and accused his rival, Hillary Clinton, of being soft on the Iranian regime after receiving donations from foreign governments through her Clinton Foundation.

“It’s a pretty hypocritical position to take,” said Richard Nephew, a former U.S. State Department official who worked on Iran sanctions for nearly a decade for both George W. Bush and Barack Obama. “It suggests that his principles are pretty flexible when it comes to him getting paid.”

Documents obtained by the ICIJ shows that Bank Melli's office in the GM Building, which Trump sold in 2003, was “owned or controlled” by the Iranian government and would have been subject to economic sanctions against Iran.

Bank Melli was prohibited from conducting bank transactions in the U.S., but it may have kept an office in Trump's building in hopes that the sanctions might one day be eased.

Trump has been an outspoken critic of Iran since the 1980s, when President Ronald Reagan imposed new sanctions after the Islamic regime was linked to terror attacks in Argentina and Saudi Arabia.

The real estate developer and future reality TV star suggested in a 1987 speech that the U.S. should attack Iran and seize some of its oil fields, and he continued to bash the regime.

“I’d be harsh on Iran," Trump told The Guardian in 1988. "They've been beating us psychologically, making us look a bunch of fools. It’d be good for the world to take them on.”

Ten years later, Trump -- who likes to brag that he's a hands-on manager of his businesses -- would be cashing rent checks from the Iranian-controlled bank, although a longtime employee denies knowing the bank was a tenant.

“We had any number of tenants in the GM Building,” said George Ross, a longtime vice president of the Trump Organization. “They might have been in there, but I have no knowledge of them.”

A spokesperson for the Trump Organization declined to comment unless the story was positive, the ICIJ reported, but the former State Department official said there's no excuse for renting to the Iranian-controlled bank.

“Should someone in America have known better than to do business with Iran? Yeah,” Nephew said.