Days after Donald Trump was elected president of the United States, he received a stark warning from America’s outgoing leader.

In their first and only meeting, Barack Obama told his successor that North Korea ― a volatile nation hellbent on nuclear proliferation ― would pose the biggest foreign challenge his administration would face.

Trump, who has dedicated much of his presidency to erasing Obama’s legacy, seemed to heed this advice, briefly. After rarely mentioning North Korea during his election campaign, he swiftly elevated the issue to his primary foreign policy concern (and later declared an end to Obama’s “era of strategic patience” with the rogue state).

But under Trump’s leadership, the past year has seen brewing tensions between Washington and Pyongyang soar to unprecedented levels with a specter of nuclear war. Economic sanctions in response to a series of North Korean missile launches escalated into a direct exchange of heated insults and threats between Trump and Kim Jong Un, the hermit kingdom’s hostile dictator.

KCNA KCNA / Reuters Kim Jong Un in an undated photo released by North Korea's news agency on Sept. 16, 2017.

North Korea’s Nuclear Strides

The Pentagon’s efforts to stave off conflict with North Korea have been marred by a string of “decisive failures” this year, according to new analysis published this month from the Brookings Institution, a Washington-based think tank.

“The United States and [North Korea] have engaged in bellicose rhetorical brinksmanship, making war between the two states seem increasingly likely,” wrote Katy Collin, a post-doctoral fellow at the Brookings Foreign Policy program. “Public acceptance of the possibility of conflict within the United States has ballooned. Mechanisms to head off escalation caused by misunderstandings do not exist.”

North Korea made remarkable technological advances to its internationally condemned nuclear program throughout 2017. It conducted its sixth and most powerful nuclear test on Sept. 3, which the regime claimed was a hydrogen bomb loaded onto an intercontinental ballistic missile (ICBM). Subsequent analysis of seismic data revealed the test was approximately 17 times stronger than the blast that decimated the Japanese city of Hiroshima during World War II.

Pyongyang has also expanded the reach of its missiles this year: The entire continental U.S. is now believed to be within ICBM striking range. Experts have expressed concern at North Korea’s alarming progress, and worry that it is on track to outpace America’s abilities to defend itself and its allies in the region.

The regime’s most recent missile launch in late November exceeded 8,100 miles in range. As tested, such a rocket would be able to travel more than enough distance to reach Washington, D.C., or New York City, although it is unclear if it could transport a warhead that far.

“North Korea knows what they’re doing,” David Wright, a physicist and the co-director of the global security program at the Union of Concerned Scientists, told HuffPost at the time. “It’s hard to say if it’s six months or two years before they can deliver a nuclear warhead, but it’s heading in that direction.”

Jonathan Ernst / Reuters President Donald Trump has traded insults with North Korea's leader, rather than focusing on a more careful diplomatic approach to the hermit kingdom.

Donald Trump’s Fire And Fury

Yet Trump, undermining diplomatic efforts by his own Secretary of State Rex Tillerson, has repeatedly confronted North Korea’s provocations with aggravations of his own. He infamously vowed in August to meet the defiant country with “fire and fury,” prompting Pyongyang’s threat to launch a missile at the U.S. island territory of Guam.

Months later, Trump said the U.S. would “totally destroy” North Korea, which is home to an estimated 25 million people, if provoked. “Rocketman is on a suicide mission for himself and for his regime,” Trump said in his first speech before the United Nations General Assembly, referring to Kim.

In an extremely rare personal address, Kim responded by pledging to “tame the mentally deranged U.S. dotard with fire.” Soon after, North Korean Foreign Minister Ri Yong-ho said the regime might detonate an H-bomb in the Pacific Ocean.

As hostilities boiled over, experts urged the “America First” leader to “stick to the script” and avoid making incendiary comments about North Korea during his 12-day trip through Asia last month. But Trump couldn’t help himself:

Why would Kim Jong-un insult me by calling me "old," when I would NEVER call him "short and fat?" Oh well, I try so hard to be his friend - and maybe someday that will happen! — Donald J. Trump (@realDonaldTrump) November 12, 2017

The president’s taunts “create an incentive for the North Koreans to stage provocations to show him up,” Jeffrey Lewis, a nuclear weapons expert at the Middlebury Institute of International Studies, told HuffPost in November.

If the situation deteriorates into an acute crisis, such remarks from Trump could give North Korea the impression a military strike is imminent, Lewis added. “If that happens, my belief is the North Koreans would use their nuclear weapons first, in order to try to repel an invasion.”

A turbulent 2017 has stirred fears and uncertainty for the year ahead.

“Trump has been impatient with multilateral, diplomatic containment of nuclear proliferation,” Collin said. “While diplomacy, sanctions, and targeted engagement have been successful in preventing conflict on the Korean peninsula for decades, 2017 marks decisive failures in terms of North Korea’s nuclear capacities.”