US defence secretary James Mattis is in South Korea on the first foreign trip by a senior official in the Trump administration.

Mr Mattis is expected to use the visit to reassure Seoul of continuing US commitment to security deals in the face of threats from North Korea.

While campaigning, Donald Trump accused South Korea and Japan of not paying enough for US military support.

He also suggested they could be allowed to arm themselves with nuclear weapons.

Both Japan and South Korea rejected this idea.

On the campaign trail, Mr Trump also said he was willing to talk to North Korean leader Kim Jong-un, contradicting longstanding US, South Korean and Japanese policy.

Mr Mattis will be in South Korea until Friday, and will hold talks with his Korean counterpart, Han Min-koo, among other officials.

The Pentagon said the visit would “underscore the commitment of the United States to our enduring alliances with Japan and the Republic of Korea, and further strengthen US-Japan-Republic of Korea security cooperation”.

Mr Mattis told reporters he would discuss the planned deployment of a US missile defence system in South Korea, and North Korea’s nuclear programme.

Analysis: Stephen Evans, BBC News, Seoul

Secretary Mattis has indicated he will emphasise that US alliances in East Asia will remain strong. But what the Trump administration will do about the North Korean nuclear arsenal remains unclear.

There is a view in South Korea that Mr Obama’s policy of “strategic patience” (squeeze Pyongyang and wait for it to buckle) has not worked, and that a deal may have to be done with Kim Jong-un.

Nobody thinks, though, that the North Korean leader is going to give up on his plans to have effective nuclear weapons.

Any deal would probably have to accept that it gets the bomb but then agrees to limit its development and that of missiles to fire them. Would Mr Trump buy that?

The visit comes amid increasing threats from North Korea that it is ready to test-fire a new intercontinental ballistic missile at any time.

Under the Obama administration, the US and South Korea agreed to the deployment of a Terminal High Altitude Area Defense (THAAD) missile defence system to defend the South from North Korean missiles.

But the move has angered China, which says it threatens its own security and goes “far beyond the defence needs of the Korean peninsula”.

There are just under 28,500 US military personnel based in South Korea, as part of a post-war arrangement. South Korea pays about $900m (£710m) annually towards the deployment.

On Friday, Mr Mattis will travel to Japan, for talks with Defence Minister Tomomi Inada.

There are a further 50,000 soldiers plus their dependents and support staff in Japan. The US pays about $5.5bn for its Japanese bases in 2016, with Japan paying a further $4bn.