Barack Obama has warned North Korea that the United States “will not hesitate to use our military might” to defend allies, condemning the actions of “a pariah state that would rather starve its people than feed their hopes and dreams” and characterising the 38th parallel dividing the two Koreas as “freedom’s frontier”.

“North Korea’s continued pursuit of nuclear weapons is a path that leads only to more isolation,” the president said on a visit to South Korea that coincides with signs from the North of a fourth nuclear test. Obama raised the possibility of further sanctions if a test goes ahead.

“The commitment that the United States of America has made to the security of the Republic of [South] Korea only grows stronger in the face of aggression,” Obama said in a speech to some of the 28,000 American service members stationed in South Korea. “Our alliance does not waiver with each bout of their attention seeking. It just gains the support of the rest of the world,” he said at Yongsan Garrison, headquarters for US forces in the country.

The website 38 North, which closely monitors North Korea, said commercial satellite imagery from Wednesday showed increased movement of vehicles and materials near what are believed to be the entrances to two completed tunnels at the Punggye-ri nuclear test site. The movements could be preparation for an underground atomic explosion, although predicting such a test is difficult.

Obama said of North Korea’s attempts to show force: “Anybody can make threats. Anyone can move an army. Anyone can show off a missile. That doesn’t make you strong.

“We we will not hesitate to use our military might to defend our allies and our way of life.”