TOKYO, Japan — You don’t need to look far beyond the current spirit of unity between Japan and South Korea before the cracks start to appear.

While leaders in Seoul and Tokyo put on show of unity in the face of an increasingly unpredictable North Korean regime, the scars of their shared history are never far away.

Sunday marked exactly 100 years since Japan began its 35-year colonial rule of the Korean peninsula. If the pertinent document, the 1910 Japan-Korea Annexation Treaty, sounds benign enough, what followed was anything but.

The colonialist’s legacy — as any student of the British Raj knows — is a Janus-faced creature. Many in Japan point to their country’s role in building a modern infrastructure and education system on the peninsula, and in improving agricultural and industrial output.

Decades after the last Japanese troops left, bilateral ties are in robust health. The countries have synchronized policy to limit the fallout from the global financial crisis and are in talks to establish a free trade agreement. The spectre of a nuclear North Korea has fostered unprecedented cooperation on security issues.

The stars of Korean TV dramas are household names in Japan, whose manga and anime films have built a mass following since the South Korean government lifted a ban on Japanese pop culture in 1998. And the ease with which it is possible to travel from one country to the other has given millions firsthand experience with their neighbor.

Yet few among those who observed Sunday’s anniversary in Seoul will have reflected on Japanese colonial rule with dewy-eyed sentimentality.

Citizens were forced to adopt Japanese names and speak their colonial master’s language, while schoolchildren were made to swear allegiance to the emperor in Tokyo. Tens of thousands of men and women were forcibly taken to Japan to perform dangerous jobs or to work as sex slaves for the Japanese army.

It is hardly surprising that the two countries cling to wildly diverging historical narratives. While just 20 percent of Japanese have a negative view of colonial rule, according to a recent survey in the Korea Times newspaper, 79 percent of Koreans thought it was unjust.

The trauma of the past has been soothed by the arrival last summer of a left-of-center government in Tokyo that has made improving relations with Asia a cornerstone of its foreign policy.

Last month, days before the 65th anniversary of Japan’s defeat in the Pacific War, the prime minister, Naoto Kan, voiced a “heartfelt apology” for the damage colonialism inflicted on the Korean peninsula.

In a statement that pointedly ignored North Korea, he said: “It is easy for the side that inflicted the pain to forget, while those who suffered that pain cannot easily forget. I express a renewed feeling of deep remorse and state my heartfelt apology for the tremendous damage and suffering caused by colonial rule."

The South Korean president, Lee Myung-bak, welcomed the statement as “one step forward,” but stopped well short of suggesting that the damage had been repaired. “There remain issues that have to be resolved,” he said.

Ordinary South Koreans were more blunt. "August the 29th is a day of humiliation when the Imperial Japan seized our national sovereignty 100 years ago and started suppressing our people as if we were slaves," Kim Young-il, head of the Korean Liberation Association, which represents former independence fighters, told a rally in Seoul on Sunday.

The countries have also failed to resolve several long-running disputes.

Japan refuses to pay compensation to former sex slaves — the so-called comfort women — insisting that all compensation claims had been dealt with by postwar treaties. They disagree, too, over the name of the ocean that separates them: Tokyo refers to it as the Sea of Japan, while in South Korea it is called the East Sea.

Potentially most damaging of all are their competing claims to a group of islands in the Japan Sea/East Sea known as Takeshima in Japan and Dokdo in South Korea. Aside from the islands’ symbolic value, they are surrounded by rich fishing grounds and, possibly, oil and gas deposits.

In a sign of what some regard as greater diplomatic maturity, Japan postponed publication of its latest defense white paper, which describes Takeshima as inherently Japanese, until after the centenary.

But Takeshi Akamatsu, a foreign ministry spokesman, said Tokyo would never relinquish its claims. “In light of the historical facts and international law it is clear that Takeshima is an inherent part of Japan,” he said. “There is no change in our position, but we don’t want the territorial issue to harm our relations with South Korea.”

Akamatsu noted that Seoul has refused a Japanese offer to settle the matter at the international court of justice in The Hague.

Shin Yeon-sung, secretary-general of the Northeast Asian History Foundation, insists that Dokdo belongs to South Korea, whose coastguard now occupies the islands.

“We won’t go to The Hague because this is not a legal issue,” Shin said. “Dokdo is Korean, so there is no need for a dispute with Japan. But we also want to avoid this becoming a thorn in the side of bilateral ties. A hundred years after Japan’s colonization of Korea, it is time to look forward.”

Both countries seem eager, for now, to put bilateral disputes to one side while they focus on more urgent threats to stability posed by North Korea. But it can only be a matter of time before history rouses itself to test their friendship yet again.