SINGAPORE -- Japanese Prime Minister Shinzo Abe and Russian President Vladimir Putin agreed on Wednesday to accelerate talks toward concluding a peace treaty based on a 1956 declaration, which stipulates the return of two of four northern islands to Japan.

While the Japanese side has not abandoned its stance of ultimately retrieving all four islands, Abe's acceptance of the 1956 declaration as the foundation of peace treaty talks signals a new flexibility on a long-standing territorial issue.

Abe told reporters after the 90-minute meeting in Singapore that he intends to visit Russia early next year, and is "determined" to wrap up talks toward a treaty based on Wednesday's agreement with Putin.

The two countries have yet to sign a formal peace treaty after World War II amid a dispute over the southernmost Kuril Islands, currently administered by Russia and claimed by Japan as the Northern Territories. Under the Japanese-Soviet Joint Declaration of 1956, the USSR agreed to hand over two of the four islands -- Shikotan and Habomai -- once such a pact was concluded.

Abe did not touch on the fate of the two other disputed islands, Kunashiri and Etorofu. "We will resolve the territorial issue and sign a peace treaty based on the trust built between Japan and Russia," he said.

The Japanese side is thought to be considering a solution that would see the return of two islands first, with a settlement over the remaining two islands to follow later.

"We will not pass off this matter that has remained unresolved for more than 70 years since World War II to the next generation," Abe said. "President Putin and I will bring an end to it ourselves."

This marked the 23rd time the two leaders have sat down for a meeting. It is the first time the two have met since Putin called on Abe to sign a peace treaty "with no preconditions" by the end of the year, during a joint appearance at an economic forum in the Russian city of Vladivostok in September.

Putin indicated he plans to hold talks with Abe again on the sidelines of the Group of 20 summit kicking off Nov. 30 in Argentina.

The issue of the four islands has been a thorn in relations since the Soviet Union tore up a neutrality pact with Japan in 1945, and declared war. In the final days of World War II, it occupied the islands of Etorofu, Kunashiri, Shikotan and Habomai, which had until then been Japanese territory.

In 1956, then-Japanese Prime Minister Ichiro Hatoyama visited Moscow to sign the joint declaration, which ended the state of war and reestablished diplomatic and consular relations between the two countries. The two sides agreed to continue negotiations on the conclusion of a peace treaty, and the return of the two islands was to take effect after the treaty was finalized.

Putin has asserted since his first term as president began in 2000 that the terms of the 1956 joint declaration remain valid, but Japan says it will sign a peace treaty only after the status of all four islands in question is resolved.

Over the years, the Japanese side has floated various ideas to try to reach a deal, each with an eye on public opinion. In 1998, in what is known as the Kawana proposal, then-Prime Minister Ryutaro Hashimoto suggested drawing the Japan-Russia border north of the four islands, but allowing Russia to continue administration of the islands for the foreseeable future.

Other proposals have included the return of three islands, or drawing the border on the northernmost Etorofu island so that Japan and Russia would each get to keep the same amount of land in terms of square meters.

The possibility remains that Russia could claim sovereignty over the two islands even after their return to Japan. Putin has said that the 1956 joint declaration does not specify who maintains sovereignty after the handover.

Abe's enthusiasm on improving relations with Russia could be part of a geopolitical strategy, trying to hedge against the unpredictability of the Trump administration, said Kent Calder, director of the Reischauer Center for East Asian Studies at the School of Advanced International Studies at Johns Hopkins University. "I see a movement toward triangularity, a willingness to differentiate from U.S. policies by Abe," he said. "This is partly encouraged by Trump himself who doesn't respect traditional allies and Japan may be worried that the U.S. doesn't have its back."

Much of the progress going forward depends on domestic public opinion on both sides. Signing a peace treaty while keeping the final status of the remaining two islands ambiguous may be unpopular in Japan, as such a scenario could be seen as essentially giving up sovereignty over Kunashiri and Etorofu.

On the Russian side, public opinion may frustrate even a two-island deal of the sort Putin has advocated. The president's approval rating, which once stood at a lofty 80%-plus, has been dragged down by unpopular pension reforms. An October poll by the independent Levada Center puts support for Putin at 66%, a level last seen shortly before Russia's 2014 annexation of Crimea.

The country's economic malaise, along with a lack of progress on reforms to an economy dominated by Putin's allies, have also eroded the Russian leader's once rock-solid support base. Putin's nationalist appeals and calls for a "strong Russia" could backfire if he is seen as caving in to Japan on the Kurils.