Image copyright Reuters Image caption Mr Mattis (left) told South Korea's acting President Hwang Kyo-ahn the partnership was strong

US Defence Secretary James Mattis has reassured the leader of South Korea that the alliance between the two nations remains strong.

Mr Mattis said the relationship would only be strengthened in the face of threats from North Korea.

It comes after President Donald Trump accused South Korea and Japan of not paying enough for US military support.

The visit to Seoul is the first foreign trip by a senior official in the Trump administration.

Mr Mattis took the opportunity to commit to the continuation of US support through previously agreed security deals.

During his campaign last year, Mr Trump threatened to withdraw US forces from South Korea and Japan if they failed to increase their financial support to US military operations.

He also suggested that the two countries could be allowed to arm themselves with nuclear weapons, an idea that was rejected by both nations.

Mr Trump has also said that he is willing to talk to North Korean leader Kim Jong-un, contradicting longstanding US, South Korean and Japanese policy.

Image copyright Reuters Image caption North Korea has been making seemingly rapid progress in its nuclear and missile programmes

After landing at the US military's Osan Air Base, south of Seoul, he went to US Forces Korea (USFK) headquarters in the capital, where he was briefed by Commander Vincent Brooks on the security situation in the Korean peninsula, said officials.

He 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.

Image copyright AP Image caption South Korean and US Marines recently held a joint winter exercise in Pyeongchang

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?

Image copyright Reuters Image caption Mr Mattis flew in to Osan Air Base south of Seoul

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.