The comprehensive nuclear deal Iran is negotiating with the West could be undermined by increased Iranian cooperation with North Korea, a country that the U.S. intelligence community reports is ramping up its nuclear enrichment and illicit export programs.

Iran has halted its enrichment of uranium to the 20 percent level as part of the interim agreement it signed with the world’s major powers last November. That temporary deal doesn’t address Iran’s illicit trade with countries like North Korea, which has been building a massive complex of uranium-enriching centrifuges. Given North Korea’s penchant for selling Iran illicit technology, the risk of Pyongyang exporting nuclear technology is real, according to the U.S. intelligence community.

“North Korea’s export of ballistic missiles and associated materials to several countries, including Iran and Syria, and its assistance to Syria’s construction of a nuclear reactor… illustrate the reach of its proliferation activities,” the U.S. intelligence community wrote in its annual Worldwide Threat Analysis, released Wednesday. And despite its repeated pledges “not to transfer nuclear materials, technology, or know-how, North Korea might again export nuclear technology.”

North Korea has already expanded its uranium-enrichment facilities at its Yongbyon nuclear facility, and restarted a plutonium reactor at Yongbyon that was shut down in 2007, the IC report stated. North Korea conducted its third nuclear test last February.

Meanwhile, Iran continues to pursue capabilities that could ultimately be used to build missile-deliverable nuclear weapons, the IC report added. The central question is whether Tehran has the political will to actually build a nuclear bomb. Iran’s president last week said his country would not dismantle the cascades of centrifuges that the West fears Iran could use to one day rapidly produce weapons-grade fuel. Tehran is also developing advanced centrifuge designs and stockpiling low-enriched uranium.

But Iran would not be able to enrich enough uranium to weapons-grade levels to produce a nuclear bomb before the world detected that activity, the IC concluded. That’s where North Korea could come in.

Last September, at the same time Iran was secretly meeting with U.S. officials to set up the current nuclear talks, North Korea leaders visited Tehran and signed a science and technology agreement that is widely seen as a public sign the two countries are ramping up their nuclear cooperation.

“Iran declared Sept. 1, 2012 North Korea was part of their ‘Axis of Resistance,’ which only includes Iran, Syria, and Hezbollah. They’ve announced to the world they are essentially allies with North Korea,” said David Asher, the State Department’s coordinator for North Korea from 2001 to 2005.

North Korea signed a similar agreement in 2002 with Syria’s Bashar al-Assad, after which North Korean scientists aided Syria in building a nuclear reactor that was destroyed by an Israeli strike in 2007. Iran is suspected to have aided in the funding of that reactor.

“It’s a very suspicious situation and rather alarming given the precedent with Syria,” said Asher. “The last time North Korea signed an agreement like this it led to the largest act of nuclear proliferation in modern history.”

The Institute for Science and International Security, a think tank that closely monitors Iran’s nuclear program, issued a report on Jan. 15 on a possible agreement that would actually preclude Iran from getting a nuclear weapon. The report said that if Iran is allowed to maintain any nuclear-enrichment program, the supply channel for that program should be dictated by the United Nations Security Council and overseen by a panel of international experts, to ensure North Korea is not involved.

“You don’t want North Korea to become Iran’s supplier for critical components for their centrifuge program. Raw materials that Iran needs to go out and buy. If Iran can buy the raw materials they need from North Korea, there’s no way to control that or stop it,” said David Albright, president of ISIS. “Part of the challenge of these negotiations is to make sure there are conditions to say that at least if Iran cooperates with North Korea on nuclear, that would be a violation of the agreement.”

North Korea is creating a program for up to 10,000 centrifuges but nobody knows how many are operational, said Albright. “That provides Iran another option to keep their [highly enriched uranium] program advancing,” he said.

The Obama administration is tight-lipped about how and when they have raised North Korean nuclear cooperation with Iran in the context of the current round of nuclear negotiations. “We have raised all the issues involved with Iran's nuclear program and will continue to do so throughout the comprehensive negotiations,” a senior U.S. official told The Daily Beast.

In May testimony to Congress, Undersecretary of State Wendy Sherman declined to discuss the administration’s view on Iran-North Korea nuclear cooperation in an unclassified setting. But she noted that both countries had been part of the network of notorious Pakistani nuclear proliferator A.Q. Khan.

“Everyone is very well aware of the history with Pakistan, for instance, and A.Q. Khan in a network of proliferation,” she said. “So, it is very important and we think very careful about where there may be interaction that affects one or the other of these situations.”

North Korea is suspected of providing Iran with nuclear assistance in the form of scientists, hard-to-obtain centrifuge components, and raw materials, experts said. North Korea also has large natural uranium deposits.

Olli Heinonen, a former deputy at the International Atomic Energy Agency, said there has always been speculation about Iran-North Korea nuclear development. But he said proof has been very difficult to come by.

“This is one of many issues that needs to be addressed about the possible military dimension of Iran's program,” he said. He also stressed that his agency was able to surmise a list of technical items and techniques that Iran had been seeking in general, such as technology to refine steel needed for advanced centrifuges. Some of Iran's wish list, he said, had correlated with the kinds of expertise the North Koreans had. But he stressed, “this is not hard evidence.”

Other U.S. experts have pointed to other kinds of cooperation between the Islamic Republic and the Hermit Kingdom. Last March, the Washington Post reported that the two countries had cooperated on missile technology One such example is Iran’s development of its Shahab 6 missile, which has used North Korean technology for its boosters. The first reports of this cooperation go back to the 1990s.

In 2012, the German publication Die Welt quoted a former senior German defense official as saying North Korea’s 2010 nuclear test was actually a test on behalf of the Iranian program.