America was attacked by terrorists on Sept 11, 2001. It caused a paradigm change in United States foreign and security policy.
The new priority was to fight terrorism and its sponsors.
In his famous address to the US Congress on Jan 29, 2002, President George W. Bush named Iran, Iraq and North Korea as forming the "Axis of Evil". Mr Bush accused them of sponsoring terrorism and seeking to acquire weapons of mass destruction.
Iraqi President Saddam Hussein was overthrown and killed.
The leaders of North Korea feared that they were on the US list for regime change. They decided that in order to protect their regime, they must develop a capacity to deter a US attack.
In other words, they must develop nuclear weapons and ballistic weapons capable of striking the US.
A year later, in 2003, North Korea withdrew from the Nuclear Non-Proliferation Treaty. In 2006, it conducted its first underground nuclear test.
The desire to develop a first-strike nuclear capability to protect its own regime - this is the logic behind North Korea's seemingly reckless behaviour and ratcheting up of its nuclear weapons programme.
Once it has achieved this objective, North Korea's agenda was to seek a summit with the US President.
It was prepared to give up its nuclear weapons and ballistic missiles in exchange for what it wanted from the US.
And this week, North Korean leader Kim Jong Un, the grandson of former leader Kim Il Sung, who was succeeded by his son Kim Jong Il, did exactly that.
Despite its reputation as a backward, even rogue, state, North Korea, in fact, has demonstrated remarkable diplomatic skills.
Consider the Winter Olympic Games in February in South Korea.
North Korea sent a delegation to participate. Chairman Kim sent his sister Kim Yo Jong to represent him at the opening ceremony. She visited South Korean President Moon Jae In in Seoul and conveyed a message that Mr Kim would like to hold a summit with him in Panmunjom.
The first summit between Mr Moon and Mr Kim was held on April 27 in Panmunjom.
Following the summit, the two leaders adopted the Panmunjom Declaration.
The Declaration stated that the two countries will bring about the "complete denuclearisation" of the Korean peninsula, and will replace the armistice agreement that ended the 1950-1953 Korean War with a peace treaty.
South Korea sent its envoys to convey Mr Kim's message to US President Donald Trump and to persuade him to hold a summit with Mr Kim.
Mr Trump agreed to do so without the usual preconditions.
He had earlier sent then Central Intelligence Agency director Mike Pompeo to Pyongyang to see Mr Kim and to verify his sincerity.
When Mr Pompeo became the Secretary of State, he would hold a second meeting with Mr Kim in Pyongyang.
As a gesture of goodwill, Mr Kim released the three US hostages detained in North Korea.
The two sides agreed to hold a summit on June 12 in Singapore.
However, when North Korea criticised Vice-President Mike Pence and National Security Adviser John Bolton for comparing North Korea to Libya, President Trump cancelled the summit.
To rescue the situation, Mr Kim sought a second summit with President Moon on May 26 in Panmunjom.
Mr Kim requested Mr Moon to convey to Mr Trump his commitment to denuclearise the Korean peninsula and his "fixed will" to meet Mr Trump.
Mr Trump agreed to reinstate the summit on June 12 in Singapore.
THE TRUMP-KIM SUMMIT IN SINGAPORE
It was against such an on-off-on backdrop that the summit between Mr Trump and Mr Kim was held on June 12 at the Capella Singapore hotel on Sentosa.
The summit concluded with smiling photo opportunities and a ceremony where both leaders signed a joint statement before leaving Singapore.
During his visit, Chairman Kim called on Prime Minister Lee Hsien Loong and took a night tour of Singapore.
President Trump was hosted to lunch by PM Lee at the Istana. For three days, June 10 to 12, the eyes of the world were on Singapore.
Was the summit a success?
First, I want to address the issue of the cost of hosting the summit. Some Singaporeans have asked me whether it was justifiable to spend $20 million to hold it.
My answer is an emphatic yes.
The publicity and goodwill generated were worth more than $20 million.
Already, several marketing agencies have estimated that the cost of publicity from the event over those three days alone would be worth at least 10 times the amount.
A Reuters report wrote: "Andrew Darling, chief executive and founder of communications agency West Pier Ventures, said it would cost more than $200 million to generate the kind of publicity Singapore has received so far by hosting the summit.
"Media intelligence firm Meltwater said the coverage over the three days around the summit equated to US$270 million (S$364 million) of advertising, while the month leading up to it was worth US$767 million."
But the benefits for Singapore are not just financial in nature. It has enhanced our reputation as a safe, secure, efficient and beautiful city.
It has vindicated our diplomacy.
It has reinforced our growing reputation as the Geneva of the East.
Singaporeans should remember that we are a very small country.
What has kept us on the international map is our ambition to be relevant and useful to the world. By hosting the summit, we are being useful to the world and helping the cause of peace.
Second, many people are sceptical that North Korea would give up its nuclear weapons and ballistic missiles. Is Chairman Kim sincere or is he trying to deceive the world? What is the quid pro quo? What did he get in return?
The truth is that he is indeed getting quite a lot: recognition of the Kim regime as the legitimate government of North Korea and Mr Trump's commitment to provide security guarantees to North Korea, and the prospect of sanctions ending at a later stage. A peace treaty is also possible.
Mr Trump also promised during the press conference after the signing ceremony that there would be a stop to the war games carried out annually by the US and South Korea.
Did the US give away too much, as critics suggest?
Well, Mr Trump has gained the following benefits: the "complete denuclearisation of the Korean peninsula", meaning that North Korea is prepared to give up all of its nuclear weapons and ballistic missiles; and the recovery of the remains of prisoners of war and those missing in action from the war.
Mr Trump also disclosed that Mr Kim had agreed to the destruction of nuclear test sites and the site for the testing of rocket engines.
Which side gave away more?
To be honest, it is hard to do balance-sheet accounting at this point, when too little is known, the hard negotiations have not yet taken place, and the world does not know if either of the two mercurial leaders will honour their signed and verbal pledges.
Instead, the world should celebrate the fact that the Trump-Kim summit has taken place, as well as its outcome. We should remember that, a year ago, the two nuclear-armed countries were on the brink of going to war.
Even six months ago, the leaders of the two countries were exchanging threats and insults.
It is, of course, true that the joint statement has to be implemented by subsequent agreements.
There is therefore a lot of work to be done in the months ahead.
We should nevertheless salute President Trump and Chairman Kim for changing the course of world history: moving the world from a war scenario to a peace scenario. We should also salute President Moon for the indispensable role he has played to make the summit a reality.
I wish to conclude by hoping that Mr Kim will do for his country what Deng Xiaoping did for China.
Perhaps his brief visit to Singapore has shown him what a future North Korea could look like.
Professor Tommy Koh is Ambassador-at-Large for Singapore.
We have been experiencing some problems with subscriber log-ins and apologise for the inconvenience caused. Until we resolve the issues, subscribers need not log in to access ST Digital articles. But a log-in is still required for our PDFs.