Seemingly isolated amid the high-stakes rapprochement between ally the United States and longtime enemy North Korea, Japan now finds itself in a precarious position as the administration of Prime Minister Shinzo Abe gropes for a new role in any grand bargain to rid the Korean Peninsula of nuclear weapons.

But after North Korean leader Kim Jong Un’s meetings with Chinese President Xi Jinping, South Korean leader Moon Jae-in and U.S. President Donald Trump, could Tokyo’s own detente with Pyongyang — and everything that would entail — be closer than it has been in more than 15 years? And if that is the case, what would that mean?

Possibly as much $10 billion, or more than a third of the North’s estimated gross domestic product in 2013, the most recent figure available according to the CIA World Factbook.

For North Korea, some experts say Japan represents a potential cash cow and could play a key role in a claimed shift by Kim from a focus on nuclear weapons to his country’s tattered economy.

For Tokyo, with its long historical links to the Korean Peninsula, its nuclear-armed neighbor represents more than a mere security concern — despite its arsenal of shorter-range missiles capable of striking much of Japan. Rather, the normalization of ties with the North is seen as one of the final pieces in a puzzle Japan is still trying to solve more than 70 years after its colonial rule of the Korean Peninsula ended with its defeat in World War II.

“Japan’s prime motivation for normalization is a genuine desire to settle this last great unresolved issue,” said Christopher Hughes, a Japanese studies professor at the University of Warwick in England. “Despite … past suspicions of Japan’s engagement of the North as some sort of divide and rule on the Korean Peninsula, Japan is serious about trying to deal with its colonial past and do what it can do to moderate North Korean behavior.”

Now, in the wake of the June 12 historic summit between Kim and Trump, the process of Japan beginning to solve that long-festering quandary could be moving forward.

While the U.S. has pledged to guarantee the security of the Kim regime, Trump has touted Tokyo as an important player in the nuclear negotiations with Pyongyang, noting pointedly during a June 1 meeting at the White House with Kim’s right-hand man that he envisioned a large role for Japan in providing economic aid to help build up the North’s stagnant economy. The U.S. ambassador to Japan, William Hagerty, has also played up Tokyo’s position, saying just after the Kim-Trump summit that its role in aiding the North’s economic development would be “significant.”

Abe has in recent weeks worked to craft Japan’s own path ahead and reconcile his outspoken support for Trump’s hard-line “maximum pressure” policy as the U.S. president softens his tone in hopes of reaching a deal.

The Japanese leader has repeatedly voiced hopes of holding direct talks with the North, though caveats abound. He has stressed that the issue of the North’s missile and nuclear programs must be resolved, but — perhaps more importantly — has also first demanded that Kim reveal the fate of Japanese citizens abducted by North Korea to train its spies decades ago.

For his part, Kim, too, appears interested in talks with Abe, telling South Korea’s Moon in late April that he is ready to hold a dialogue with Japan at “any time.”

However, Abe has said time after time that Japan will hold back any economic incentives until all of its concerns — the nuclear, missile and abduction issues — are resolved.

“In the end, I myself need to meet Chairman Kim face to face and have a summit talk,” Abe told a session of the Diet’s Upper House on June 18.

One possibility for improving ties is for Abe to look to his past, specifically the 2002 Pyongyang Declaration, which he himself had a hand in crafting when he was a deputy and later chief Cabinet secretary under then-Prime Minister Junichiro Koizumi.

“A good starting point would be to return to and build on the 2002 Pyongyang Declaration, which included a Japanese apology for colonialism and a promise of ‘economic assistance,’ but not of “reparations,’ ” said Tessa Morris-Suzuki, a professor of Japanese and Korean history at Australian National University in Canberra.

The declaration, signed by Koizumi and the North’s leader at the time, Kim Jong Il, at a landmark meeting in Pyongyang laid the groundwork for settling the abductee issue and normalizing relations. In it, Pyongyang pledged to take “appropriate measures” to rectify the “regrettable incidents” — a euphemism for the abductions. Both leaders also agreed to work toward “the settlement” of the “unfortunate past between them,” which the document said “would greatly contribute to the peace and stability of the region.”

In terms of economic assistance, the declaration served up some surprisingly detailed possibilities for doling out aid to the North.

It included options such as “grant aids, long-term loans with low interest rates and such assistance as humanitarian assistance through international organizations, over a period of time deemed appropriate by both sides,” as well as “other loans and credits by such financial institutions as the Japan Bank for International Co-operation with a view to supporting private economic activities.” This type of aid, it said, “would be consistent with the spirit” of the declaration.

Full-blown normalization between Japan and North Korea would ultimately be comparable to the 1965 agreement between Seoul and Tokyo to re-establish diplomatic ties. That deal saw Seoul receive some $800 million in “economic assistance.” By some projections this could deliver a compensation package to the North today of anywhere between $5 billion and $10 billion — a sizable amount for the relatively weak North Korean economy.

Ultimately, Koizumi was unable to proceed on the normalization issue after talks were hampered by the flaring of tensions over the abductions and the deterioration in security ties around the Korean Peninsula.

Now, 16 years since the ink dried on the Pyongyang Declaration, plenty of obstacles — many old, but some new — remain if a similar deal is to be reached.

In North Korea, Kim Jong Un, the third ruler in the Kim regime family dynasty, is firmly in the driver’s seat, and Abe, now the prime minister, maintains a tenuous grip on office.

Kim now boasts an arsenal that includes nuclear-tipped missiles believed capable of striking most of the continental United States, to say nothing of Japan. Abe, meanwhile, has seen much of his political clout sapped by a series of corruption scandals, and now finds himself on the outs with Trump, who is preparing to slap tariffs on Japan and switch gears on North Korea.

The question is, could Abe deliver a monumental about-face on relations with Pyongyang?

“I think that Abe is in a weak position to engage effectively with North Korea,” said Morris-Suzuki. “Recent developments have left him somewhat on the sidelines, and both his long-standing stance on North Korea and his nationalist approach to history issues … will make it difficult for him to find a comfortable way of engaging with North Korean negotiators.”

Others say any move would come only if Abe can moderate the demands of his own party to find a resolution that may not go as far as some in his ruling Liberal Democratic Party might hope.

“The North may have more information to provide Japan on the fate of abductees and may be willing to admit further culpability of the regime, but it simply will not be able or willing to go beyond accounting for the fate of the known abductees as some Japanese conservatives would like,” said Hughes of the University of Warwick.

“So some political courage will be necessary by Abe to be prepared to extract some more information and contrition from North Korea, but also to draw a line under this,” he added.

Still, said Hughes, Abe “might be able to do this given his credentials as a hard-liner a la Nixon normalizing ties with China.”

Ironically, if Japan and North Korea can reach a deal on the abduction issue, then the rest of the normalization should not be that complicated, since the Pyongyang Declaration lays out a template for the process, Hughes said.

Reaching out to Pyongyang would not be the first time that a leader has looked to foreign affairs as a distraction amid declining support numbers. A breakthrough on North Korea would give Abe an unexpected diplomatic prize ahead of a crucial LDP presidential election to be held around Sept. 20. A win in that poll would cement his legacy and put him on a path to being Japan’s longest-serving prime minister ever.

But one of the biggest questions is Kim’s seriousness about trading his nuclear weapons for economic and diplomatic incentives needed for his country to achieve prosperity.

In an April speech at a ruling Workers’ Party plenum, months after successfully testing long-range missiles and conducting his country’s most powerful atomic blast, Kim declared victory on the nuclear front — a step that has allowed him to justify his shift from the nuclear issue to the economy.

This has led some, including South Korea’s Moon, to claim that Kim wants to be seen as the North Korean equivalent of Deng Xiaoping, the leader who oversaw the economic liberalization of China.

Regardless of the veracity of this claim, experts say the young North Korean leader almost certainly is working to finagle his way out of crushing U.N. and unilateral sanctions — measures strongly supported by Tokyo — and may see Japan as a golden opportunity.

“I have long thought that Kim would sense that if he ever got into real trouble, he always could reach out to a soft South Korea and a rich Japan, and this is what he now seems to be doing,” William Brown, an adjunct professor at Georgetown University and former analyst with the U.S. State Department and CIA, said in an interview.

Brown said that the North’s economy is in “huge trouble,” and that it remains “desperate for foreign exchange.” With Japan, he said, there are several ways to acquire it, including via the normalization route.

Pyongyang, he added, also may have eyes on Tokyo as a possible strategic hedge.

“Much is made in Western circles of North Korea’s economic dependence on China amid questions of whether and how much leverage this gives Beijing. In an end game, however, Pyongyang may think it has other cards to play,” Brown wrote in a 2016 report on North Korean-Japan economic ties. “One important card long held by the North Koreans, and perhaps a trump card, is the relatively easy ways that Pyongyang could repair or at least improve relations with Japan, and from that gain great economic benefit.”

As a result of settling the abduction issue and moving toward normalization of diplomatic relations, the North could reap benefits in economic assistance, trade, travel and tourism earnings, and Japanese direct investment.

“Taken in sum, they would resolve, temporarily, most of Pyongyang’s current economic difficulties,” Brown wrote. “If combined with economic reforms along the lines pursued by Seoul when it made similar accommodations with Tokyo … North Korea could jump onto a growth track to enable it to start catching up economically with its South Korean rival, presumably high on the list of Kim Jong Un’s wish list.”