The US defence secretary warned North Korea on Friday of an "effective and overwhelming" response if Pyongyang chose to use nuclear weapons.

"Any attack on the United States, or our allies, will be defeated, and any use of nuclear weapons would be met with a response that would be effective and overwhelming," Defense Secretary James Mattis said on a visit to South Korea, one of America's closest allies.

The remarks came as concern from mounted that North Korea could be readying a new ballistic missile test, in what could be an early diplomatic challenge for President Donald Trump's administration.

Al Jazeera’s Harry Fawcett, reporting from Seoul, said: "There is a great deal of focus as to potential change in US policy towards North Korea and towards the alliance here in South Korea as well."

North Korea, which is technically still at war with the South since signing an Armistice agreement in 1953, carried out more than 20 missile tests last year, as well as two nuclear tests, in defiance of UN resolutions and sanctions.

READ MORE: Analysts say North Korea not bluffing on ICBM launch

"North Korea continues to launch missiles, develop its nuclear weapons programme and engage in threatening rhetoric and behaviour," Mattis said at the end of the two-day visit - his first overseas trip.

Missile system

A US missile defence system, known as Terminal High-Altitude Area Defense (THAAD), is due to be deployed in South Korea later this year. China has objected to THAAD, saying it will destabilise the regional security balance, leading to calls from some South Korean opposition leaders to delay or cancel it.

"Both governments committed themselves to implementing it by the end of this year, but a presidential impeachment scandal is still ongoing here," Al Jazeera's Fawcett said. "It is possible there will be a change in government before that. So it remains something of an open question."

South Korean Defence Minister Han Min-koo, though, reaffirmed plans to deploy THAAD and said Mattis' visit to Seoul - his first trip as defence secretary - sent a clear message of strong US support.

"Faced with a current severe security situation, Secretary Mattis' visit to Korea ... also communicates the strongest warning to North Korea," Han said.

READ MORE: Will there be a Korean war under Donald Trump?

The US military has a permanent base in South Korea and the two countries conduct regular military drills that the North has called provocations. The reclusive state has often threatened military action, including nuclear and missile attacks against South Korea and the US.

The North appears to have restarted operation of a reactor at its main Yongbyon nuclear facility which produces plutonium that can be used for its nuclear weapons programme, according to US think-tank 38 North.

Once fully developed, a North Korean intercontinental ballistic missile (ICBM) could threaten the continental US, which is about 9,000km from North Korea. ICBMs have a minimum range of about 5,500km, but some are designed to travel 10,000km or more.