WASHINGTON, Feb. 26 (Yonhap) — U.S. President Donald Trump said Monday that talks with North Korea are possible only under the right conditions.

His remark comes after the communist regime twice stated its willingness to hold dialogue with Washington over the weekend.

"They want to talk. And we want to talk also, only under the right conditions. Otherwise, we're not talking," Trump said at a meeting with U.S. state governors at the White House.

He did not elaborate on what the conditions would be, but slammed previous U.S. administrations for failing to tackle the problem of North Korea's nuclear weapons program.

This AP file photo shows U.S. President Donald Trump. (Yonhap) This AP file photo shows U.S. President Donald Trump. (Yonhap)

"Other presidents should have solved this problem long before I got here," he said. "And they've been talking for 25 years, and you know what happened? Nothing."

He pointed to the administrations of Bill Clinton, George H.W. Bush, George W. Bush and Barack Obama, saying it would have been "much easier" to solve the issue then.

The possibility of talks between Washington and Pyongyang gained traction this year after the two Koreas held rare high-level talks to discuss North Korea's participation in the PyeongChang Winter Olympics.

Seoul hopes that improved inter-Korean ties will help pave the way for denuclearization negotiations between Washington and Pyongyang. Tensions heightened last year as the reclusive nation aggressively pursued its capability to launch nuclear-tipped missiles at the U.S. mainland.

As the Olympics drew to a close Sunday, a senior North Korean official told South Korean President Moon Jae-in his country has "ample intentions" to hold talks with the U.S. The official, Kim Yong-chol, who was sent by Pyongyang to attend the closing ceremony, made similar remarks in a meeting with Moon's chief national security adviser Monday.

"So they want to talk, first time, they want to talk, and we'll see what happens," Trump said. "That's my attitude. We'll see what happens. But something has to be done."

He said China has "been good, but they haven't been great" when it comes to putting pressure on North Korea to abandon its weapons programs.

"China has really done more, probably, than they've ever done because of my relationship," Trump said. "We have a very good relationship, but President Xi (Jinping) is for China, and I'm for the United States."

Russia, on the other hand, has been "behaving badly, because Russia is sending in what China is taking out," he added, apparently referring to the two countries' trade with North Korea.

The U.N. Security Council imposed four rounds of sanctions on North Korea last year in response to its nuclear and ballistic missile tests. China and Russia — two of the five veto-wielding council members — backed all of them. The sanctions are designed to cut off supplies of fuel and sources of revenue for the Pyongyang regime.