Donald Trump has become the first serving US president to cross the border into North Korea.
Mr Trump shook hands with Kim Jong Un at the border line on the Korean peninsula's demilitarised zone (DMZ), a swift turnaround in Twitter diplomacy after floating the idea on social media on Saturday.
The American leader was invited to cross the line by Mr Kim, and stepped over, spending a brief time in North Korea before bringing Mr Kim back with him into South Korea.
During the meeting, the pair agreed to revive talks on the North's nuclear weapons programme.
It's the first time a sitting US president has gone into North Korea
The demarcation line marks the divide between the two nations, and has been in place since 1953. The Korean War has never officially ended.
As he announced the resumptions of talks, Mr Trump told reporters "we're not looking for speed. We're looking to get it right".
He added that economic sanctions on the North would remain.
Also, significant doubts remain about the future of the negotiations and Pyongyang's willingness to give up its stockpile of nuclear weapons.
The historic handshake and photo opportunity is the third time Mr Trump and Mr Kim have met, and was the first meeting since a failed second summit in Hanoi, Vietnam in February.
It will give both leaders some political points at home following those collapsed talks, but there are as yet no indications that there would be another breakthrough in talks between the US and the secretive North Korea.
As Mr Trump approached Mr Kim, the North Korean leader said: "I never expected to meet you at this place."
Donald Trump and Kim Jong Un stand at the military demarcation line dividing North and South Korea
Mr Trump also extended an invitation to Mr Kim to visit the White House.
The US president told reporters it was a "great honour" to cross the border and said he was "proud" to have done it.
Marine One flew the president and his team to the DMZ from Seoul in South Korea, where he had held meetings with President Moon Jae-in, after attending the G20 summit.
Mr Trump was show various landmarks from the top of Observation Post Oullette.
The US president brought the North Korean leader back into South Korea
During the visit, Mr Trump said the area used to be "very dangerous" but much less so now since the first Trump-Kim summit in Singapore in June 2018.
He said: "I say that for the press. They have no appreciation for what is being done, none.
"There was great conflict here prior to our meeting in Singapore.
"After our first summit, all of the danger went away.
"It's all working out, it always works out."
Mr Trump said he had been prepared to be asked into North Korea
He met with troops stationed at the DMZ, which includes South Korean and US soldiers, telling them: "We're with you all the way."
Mr Trump praised Mr Kim for meeting with him at such short notice, calling it a "bold decision".
Mr Trump had sent a tweet saying: "After some very important meetings, including my meeting with President Xi of China, I will be leaving Japan for South Korea (with President Moon). While there, if Chairman Kim of North Korea sees this, I would meet him at the Border/DMZ just to shake his hand and say Hello(?)!"
Donald Trump was accompanied by his South Korean counterpart Moon Jae-in
He told Mr Kim if he "didn't turn up the press was going to make me look very bad" and said they both "looked good".
He also took credit for lessening tensions on the Korean peninsula, saying that there had been "tremendous danger" but adding: "After our first summit, all of the danger went away."
Every US president since Ronald Reagan has visited the 1953 armistice line except for George HW Bush, who visited when he was vice president under Mr Reagan.
The DMZ is thought to be the most heavily fortified strip of land in the world, and stretches 154 miles (248km) long by 2.5 miles (4km) wide.
It's a minefield laced with barbed wire and guarded by combat troops on both sides. It's been the site of numerous, sometimes deadly, gun battles and skirmishes.