WASHINGTON (AFP) - United States President Donald Trump's face-to-face with North Korean leader Kim Jong Un will mark a historic milestone in relations between Washington and Pyongyang - and cap a stunning about-face for the mercurial leaders who months ago were trading threats and insults.
Here is a look back at the 18-month diplomatic roller-coaster that took Trump and Kim from rhetorical warfare to the verge of the first summit between a sitting US president and a North Korean leader, set for June 12 in Singapore.
TRUMP SETS THE TONE
On January 2, 2017, weeks before taking office, then president-elect Trump vows that North Korea will never be allowed to develop a nuclear weapon capable of reaching US territory.
Early in his presidency, however, Trump sends out conflicting signals - in separate statements in April 2017, he described Kim as both a "madman with nuclear weapons" and a "pretty smart cookie" for managing to hold onto power at his young age.
On May 1, he stuns observers by declaring he would be willing - and "honoured" - to meet the North Korean leader "under the right circumstances."
Six months into Trump's presidency, in July 2017, Kim conducts two intercontinental ballistic missile (ICBM) tests, and declares the entire United States to be within North Korea's range.
The following month, Trump threatens "fire and fury" if Pyongyang continues to threaten America, kicking off months of saber-rattling that set the world on edge.
Undeterred, Pyongyang weeks later test-fires a ballistic missile over Japan, and on September 3 carries out its sixth, "perfect" nuclear test, of a hydrogen bomb it claims can be mounted on a missile.
The US leader warns "talking is not the answer" to the stand-off with Pyongyang - although his administration still does not rule out a diplomatic solution.
WHOSE BUTTON IS BIGGER?
On September 21, 2017, Washington unveils a raft of tough sanctions to curb North Korea's nuclear and ballistic missile programme.
The announcement comes two days after Trump's maiden speech to the UN General Assembly, in which he nicknames Kim a "Rocket Man" on a "suicide mission" and warns that if threatened, the United States will have "no choice but to totally destroy North Korea."
In response, Kim brands Trump "mentally deranged" and a "dotard," warning he will pay dearly for his threats.
After a new ICBM test from Pyongyang in November, Trump derides Kim as a "sick puppy," while fears mount that the bellicose rhetoric could trigger a nuclear conflict.
As 2017 draws to a close, Kim boasts his missile arsenal can hit any city on the US mainland, warning in a New Year address that he has a "nuclear button" on his desk.
Three days into the New Year, on January 3, Trump retorts that his own nuclear button is "much bigger & more powerful."
Pyongyang brands his outburst the "bark of a rabid dog."
Following years of tensions, South Korea's hosting of the Winter Olympics in February 2018 gives the neighbours a window to reopen communications, ushering in a spectacular Korean detente.
As the two Koreas march together for the opening ceremony, the South's President Moon Jae In shares historic handshakes with Kim's sister Kim Yo Jong, and Trump's daughter Ivanka attended events with top officials from both sides.
Washington makes clear it will keep up the pressure despite signs of a regional thaw - slapping Pyongyang on February 23, 2018, with its largest ever set of sanctions, a move the regime calls an "act of war."
But in a remarkable announcement at the White House, on March 8, a top South Korean official announces that Kim will "refrain from any further nuclear or missile tests" and has invited Trump to meet him - and that Trump has agreed.
The Olympics also pave the way for a historic inter-Korean summit, on April 27, which sees Pyongyang and Seoul promise to pursue the denuclearisation of the peninsula and a permanent peace.
THE FINAL HURDLES
Over Easter weekend, Trump's CIA chief and nominee for secretary of state Mike Pompeo travels secretly to Pyongyang where he meets Kim and begins to lay the groundwork for the landmark summit.
A month later, Pompeo makes a second unannounced trip aimed at finalizing the summit details - and pressing for the release of three US citizens detained by Pyongyang.
On May 9, Trump announces the three men are headed to the United States, personally welcoming them to Washington, offering effusive thanks to Kim and heralding a diplomatic victory.
The next morning, on May 10, after weeks of teasing the announcement, Trump reveals the date and location of his "highly-anticipated meeting" with North's Korea's leader, vowing to "make it a very special moment for World Peace!"