Image copyright AFP/Getty Images Image caption North Korean Foreign Minister Ri Yong Ho (C) arrived in Sweden late on Thursday with his delegation

North Korea's foreign minister has attended talks in Stockholm with Sweden's Prime Minister Stefan Lofven, ahead of a possible meeting between US President Donald Trump and Kim Jong-un.

Pyongyang said Ri Yong-ho's trip was for "bilateral relations and issues of mutual concern".

Sweden has a long history of mediating between Washington and Pyongyang.

Mr Ri had already met his Swedish counterpart Margot Wallstrom late on Thursday and early on Friday.

Sweden's foreign ministry said their discussions would focus on tensions between the two Koreas, and Sweden's diplomatic work on behalf of the US in North Korea.

Mr Ri's visit has been extended from the scheduled two days, and he will now stay in Sweden until Sunday, Sweden's SVT Nyheter reports.

The agenda of the talks has broadened, the news site says. One topic is said to be confidence-building measures with the US, including the release of US citizens from North Korean detention.

Donald Trump last week accepted an invitation for direct talks with Mr Kim, a shock announcement from the two leaders who have traded threats and insults for months.

There has been no official word from North Korea since the invitation was delivered via South Korean officials in Washington.

Image copyright AFP Image caption Gearing up for the summit of the decade?

Sweden's prime minister told his country's news agency TT that "if the main actors want Sweden to play a role then we are ready to do that".

"We are a country that is militarily non-aligned and have a longstanding presence in North Korea, and with the trust we enjoy we think we can play a role. But it has to be the main actors who decide which role Sweden will play."

No sitting US president has ever met a North Korean leader.

Such a summit, which Pyongyang has long wanted, has previously been seen as possible only after major concessions from the North Koreans.

North Korea's defiant nuclear and missile programme has led to severe international sanctions against Pyongyang in the hope they would force the regime to abandon its military threats.

Why go to Sweden?

Sweden has longstanding ties with Pyongyang, and its embassy in North Korea was one of the first Western diplomatic missions there in the 1970s.

Sweden was also the first country in the world to declare neutrality, in 1814. It takes the position that it is best to be free of military alliances in peacetime, so it can stay neutral if war breaks out.

However, it has engaged in peacekeeping missions for the UN, and has a close partnership with Nato, sending troops to support Afghanistan's security forces.

Because of its non-alignment policy, Sweden sometimes acts as a proxy for states whose diplomatic relations are strained.

It performed that role for the UK when relations with Iran broke down, including in 1989 when Iran's supreme leader issued a fatwa ordering Muslims to kill the novelist Salman Rushdie.

The same has happened with the US and North Korea. As the US has no North Korean consulate, Sweden has previously stood in as its representative. That includes helping with the release of US citizens held by the North.

Talks to prepare talks?

The plans for the meeting between Mr Trump and the North Korean leader took the world by surprise last Friday.

It followed a year of heated rhetoric between North Korea and the US, and growing global concern that the hostilities might escalate into military confrontation.

Image copyright Getty Images Image caption North Korea's military threat has worried the world for decades

In the invitation relayed by South Korean officials, Mr Kim said he was "committed to denuclearisation".

However uncertainty remains over what would be a landmark summit. It is not yet clear:

Where the talks will take place. North Korea and the US are considered unlikely. More likely places are the border between the two Koreas, China, a neutral country - like Sweden - or international waters

What North Korea wants in exchange for the meeting and for promising denuclearisation

Whether the offer from Pyongyang is serious or just intended as a propaganda boost

Whether the summit will ultimately take place at all

Uncertainty over the summit has also been fuelled by the departure of US Secretary of State Rex Tillerson who was seen as a moderating voice favouring diplomacy over military threats.