The news that President Trump had accepted an offer to meet Kim Jong Un to talk about North Korean denuclearization took many people by surprise.

Thursday's announcement had come after nearly a year of rapidly increasing tension between the United States and North Korea, as Pyongyang made considerable leaps in its nuclear weapons program despite the Trump administration's “maximum pressure” strategy.

But this scenario may have been foretold. As Jeffrey Lewis, an expert on North Korea's nuclear program at the Middlebury Institute of International Studies at Monterey has noted, there was a preview of a similar line of events — in a North Korean propaganda film aired years ago.

As Lewis put it in tweets Thursday evening, the North Korean film “The Country I Saw” envisaged a scenario where “an American President visits Pyongyang, compelled by North Korea's nuclear and missile programs to treat a Kim as an equal.”

That detail helps explain why North Korea experts such as Lewis are skeptical about proposed Trump-Kim talks, even if many broadly support dialogue with Pyongyang.

“The Country I Saw” was a five-part series of films produced by North Korea's state-run Chosun Art Film Studio that began airing in the late 1980s. The films tell the story of North Korea's pursuit of ballistic missiles and nuclear weapons; notably, the story is largely told from a Japanese point of view, with scenes involving academics and officials in Japan discussing the developments.

Back in 2012, Lewis wrote a blog post for 38 North in which he examined the then-recently released fifth and final installation of the series from the perspective of a nuclear nonproliferation expert. He explained how the film shows rapidly increasing tension between North Korea and the international community, with the United States leading the attempts to isolate Pyongyang.

That effort falls apart, however, after North Korea conducts a second nuclear test in 2009. In the film, this move forces the United States to come to the negotiating table.

The film shows Japanese diplomats dismayed over Washington's acquiescence to North Korean demands for talks. A CIA report “reveals that President Obama started to get scared of Kim Jong Il’s courage, boldness and his autonomous and independent spirit,” one diplomat tells his colleagues in the film, according to 38 North's translation. “So I think they are going to secretly send special ambassador to North Korea.”

Japanese politicians then talk about how sanctions have failed in North Korea and how the United States may use the fate of two imprisoned American journalists in the country to justify talks. Bill Richardson, the former governor of New Mexico who has served as an envoy to North Korea before, is listed as the probable leader of a U.S. delegation, much to the chagrin of the Japanese officials.

“Sending someone that important to the undeserving North Korea is a humiliation to Japan!” one official says.

The film then ends with a clip of former president Bill Clinton visiting North Korea as triumphant music plays — an ending that suggests that Pyongyang's nuclear gambit has forced the United States to send an even more important envoy to North Korea, Lewis wrote for 38 North.

A lot has clearly changed in both the United States and North Korea since 2012, but it's important to note that this film may be one lens through which North Koreans view the proposed meeting between Trump and Kim. “The Country I Saw” was designed to justify North Korea's pursuit of weapons to a domestic audience.

Notably, it incorporated real-life events and media coverage in a pseudo-documentary style — Jean Lee, a former Associated Press reporter based in Pyongyang and now with the Wilson Center, said that when the film aired on North Korean state television, she mistook a scene about U.N. sanctions for real news.

“We all jumped up in a panic to get back to work until we realized it was the latest episode of 'The Country I Saw,' not the news,” Lee recalled in an email Friday.

As Lewis noted in 2012, the film showed that North Korea's pursuit of nuclear weapons was not only to ensure that the Kim regime remained in power, but also to reinforce the legitimacy of the regime.

“That a visit by Bill Clinton instead of Bill Richardson is the big reveal at the end of the movie says a lot about how North Korea sees its nuclear diplomacy,” Lewis wrote.

Many of the details in the film — continued weapons testing in the face of isolation, the idea that North Korea had withstood sanctions, even the Japanese dismay as the United States agreed to talks with North Korea — could fit into Pyongyang's narrative about potential Trump-Kim talks.

Indeed, Trump appears to have gone further than this North Korea propaganda film envisioned — he is now expected to become the first sitting U.S. president to meet with a North Korean leader. “This is what his father and his grandfather wanted: to be on the same footing as the world’s greatest power,” Van Jackson, a former Pentagon official who now teaches at Victoria University in New Zealand, told The Washington Post.

This may not necessarily be a bad thing: Some experts, such as Yonsei University's John Delury, have pushed for the United States to normalize its relations with North Korea anyway, arguing that treating Kim as an equal is a good substitute for endless military brinkmanship. But it may be a sign that North Korea is in the driver's seat.

More on WorldViews

What made North Korea’s weapons programs so much scarier in 2017