Updated

President Trump accused Iran of collaborating with North Korea to strengthen their missile technology Saturday evening in a Twitter post criticizing the 2015 nuclear agreement between the U.S., Iran and five other nations.

"Iran just test-fired a Ballistic Missile capable of reaching Israel," Trump wrote. "They are also working with North Korea. Not much of an agreement we have!"

Nonproliferation experts have long suspected North Korea and Iran are sharing know-how when it comes to their rogue missile programs. Earlier this month, CIA Director Mike Pompeo told Fox News' "Special Report with Bret Baier" that Iran would "certainly be someone who would be willing to pay" for that expertise.

"The North Koreans have a long history of being proliferators and sharing their knowledge, their technology, their capacities around the world," Pompeo said. "As North Korea continues to improve its ability to do longer-range missiles and to put nuclear weapons on those missiles, it is very unlikely if they get that capability that they wouldn't share it with lots of folks."

Trump posted the tweet hours after Iran claimed to have successfully tested a new ballistic missile capable of reaching parts of the Middle East, including Israel.

The missile, known as the Khoramshahr, has a range of 1,250 miles and is based on a North Korean design. A similar missile was tested in late January and blew up 600 miles after launch.

The Iranian test-launch constituted a direct challenge to Trump, who last month signed a bill imposing mandatory penalties on those involved in Iran's ballistic missile program and anyone who does business with them.

Trump has vowed repeatedly to take a tougher line toward Iran than his predecessor, threatening at various times to renegotiate or even dismantle the nuclear deal, and shoot Iranian boats out of the water if they provoke U.S. naval vessels in the Persian Gulf.

On Wednesday, Trump told reporters that he had made a decision about whether or not to pull out of the nuclear deal, but declined to say what it was.

Earlier this week, Iranian President Hassan Rouhani vowed Iran would strengthen its missile capabilities without asking for any country’s permission, just days after Trump accused Iran in an address to the United Nations General Assembly of exporting violence to Yemen, Syria, and other parts of the Middle East.

In that speech, Trump criticized the nuclear deal as "one of the worst and most one-sided transactions the United States has ever entered into."

"Frankly, that deal is an embarrassment to the United States," the president proclaimed, "and I don’t think you’ve heard the last of it, believe me."

The nuclear deal between Iran and world powers does not strictly prohibit Iran from developing missiles but after the deal came into effect last year, the U.N. Security Council adopted a resolution calling on Iran not to take any actions related to ballistic missiles "designed to be capable of delivering nuclear weapons" for eight years.

Iranian officials have argued that the measure only applies to missiles specifically designed to carry nuclear warheads.

Fox News' Lucas Tomlinson and the Associated Press contributed to this report.