South Korea's government has said US troops will remain in the country, even if a deal is reached to formally end the Korean War.

About 29,000 US soldiers are based in South Korea, under a security agreement reached after the war ended in 1953.

North Korea has previously made giving up its nuclear weapons conditional on the troops leaving the peninsula.

But a South Korean government spokesman said their presence was "nothing to do with signing peace treaties".

"US troops stationed in South Korea are an issue regarding the alliance between South Korea and the United States," said Kim Eui-kyeom, speaking for President Moon Jae-in.

In their breakthrough meeting last Friday, Mr Moon and North Korea's Kim Jong-un agreed to work towards a denuclearised Korean peninsula and a peace treaty to formally end the Korean War.

The war ended in 1953 with an armistice, so the Koreas are still technically at war.

The adviser's comment came in response to a newspaper column, written by an adviser to Mr Moon, which said it would be difficult to justify a continuing US troop presence if a peace treaty were to be signed.

'Security guarantee'
While North Korea has been vocally opposed to the US troops in the past - and has been angered by joint US-Korean military drills - there was no explicit mention of them in the Panmunjom Declaration reached at the end of the summit.

The North Korean leader is reported, however, to have told South Korea that his country would have no need for nuclear weapons if its security was guaranteed.

Mr Kim is set to hold a further historic meeting in the coming weeks, this time with US President Donald Trump.

The meeting's agenda, date and location are yet to be determined.

But Mr Trump has previously questioned why the US is spending so much on its South Korean military presence.

White House chief of staff John Kelly this week fiercely denied comments from unnamed White House officials that Mr Trump had wanted to withdraw the entire deployment ahead of the Winter Olympics in Pyeongchang.