German Foreign Minister Sigmar Gabriel has called on the United States to engage in dialogue with Iran over its nuclear program amid growing concerns about the future of the nuclear agreement Iran clinched with the P5+1 group of countries more than two years ago.

In a statement on Sunday, Gabriel welcomed US Secretary of State Rex Tillerson's announcement that Washington was in direct contact with North Korea and was “probing” whether the government in Pyongyang was open to talks about its nuclear weapons program.

Amid an escalating war of words between US President Donald Trump and North Korean leader, Kim Jong-un, Tillerson said during a brief trip to China on Saturday that his country had opened channels of communication with North Korea, adding, “We are probing, so stay tuned.”

“We ask, ‘Would you like to talk?’ We have lines of communications to Pyongyang. We’re not in a dark situation, a blackout. We have a couple, [or] three, channels open to Pyongyang; we can talk to them; we do talk to them,” he noted.

In reference to Tillerson's Sunday remarks, Gabriel said, “This is exactly the right direction. North Korea would be well advised to take this offer of talks seriously.”

The German foreign minister also warned that a possible US move to ditch the Iran nuclear agreement, known as the Joint Comprehensive Plan of Action (JCPOA), would risk undermining Washington's credibility in holding negotiations with North Korea.

“I would like to see a similar offer for Iran. If the US cancelled its nuclear deal with Iran, that would undermine the credibility of its offer to North Korea,” he added.

Iran and the five permanent members of the United Nations Security Council – the United States, France, Britain, Russia and China – plus Germany signed the nuclear agreement on July 14, 2015 and started implementing it on January 16, 2016.

Under the JCPOA, Iran undertook to put limitations on its nuclear program in exchange for the removal of nuclear-related sanctions imposed against Tehran.

During his speech at the UN General Assembly on September 19, Trump described the JCPOA, which was negotiated under his predecessor Barack Obama, as “the worst and most one-sided transaction Washington has ever entered into,” a characterization he often used during his presidential campaign.

In October, the Republican president is due to notify Congress of whether Iran is adhering to the deal after Washington said last month that it was weighing whether to pull out of the nuclear accord.

During an interview published by the Associated Press on September 27, Iranian Foreign Minister Mohammad Javad Zarif said the US president "would open a Pandora's box" if he tried to renegotiate the terms of the JCPOA.

Zarif added that the possibility of renegotiating the deal was a “myth.”

Ali Akbar Velayati, a senior advisor to Leader of the Islamic Revolution Ayatollah Seyyed Ali Khamenei on international affairs, also said on September 24 that the Islamic Republic would never accept to renegotiate or revise the provisions of the nuclear agreement.

Velayati said, “The JCPOA is an international agreement and any renegotiation on and revision of the JCPOA are rejected by the Islamic Republic of Iran.”