President Obama says the U.S. won’t back down from strengthening its military alliances and defenses against North Korea until the country “shows seriousness” toward eliminating nuclear weapons from the Korean peninsula.

“If North Korea shows seriousness in denuclearizing the Korean peninsula, then we will be ready to engage in serious conversations with them to reduce tensions,” Obama said Sunday at a news conference with German Chancellor Angela Merkel in Hannover, Germany, the final stop of a three-nation international tour.

North Korea would “have to do better” than announcing “via press release” that it intends to step back from nuclear weapons development, he said.

North Korea on Saturday test-fired a ballistic missile from a submarine, according to the U.S. Strategic Command.

It wasn’t clear how far the missile flew, and the U.S. said it “did not pose a threat to North America.” But the move was the latest in a string of military provocations from the regime of Kim Jong Un, and would represent a significant advance in North Korean weapons capability.

“Although more often than not they fail in many of these tests, they gain knowledge each time they engage in these tests,” Obama said. “We take it very seriously, and so do our allies and so does the entire world.”

In recent months, North Korea has also claimed to have successfully tested its first hydrogen bomb, launched a satellite into orbit, and developed miniaturized nuclear bombs.

North Korea’s foreign minister said Sunday the country was willing to halt its nuclear tests if the U.S. suspended its annual joint military exercises with South Korea. Foreign Minister Ri Su Yong also said that international sanctions wouldn’t change the behavior of the regime.

“If we continue on this path of confrontation, this will lead to very catastrophic results, not only for the two countries but for the whole entire world as well,” he said.