Updated

The leaders of Japan and China met on the sidelines of a Pacific Rim summit for their first formal talks since a territorial dispute erupted two months ago that badly strained ties between the Asian neighbors.

The meeting Saturday between Prime Minister Naoto Kan and Chinese President Hu Jintao, who is in Japan for the annual summit of 21 Pacific Rim countries and territories, was announced at the last minute and lasted less than a half hour. Thousands of flag-waving Japanese angry over the island dispute held a protest march just before the talks began.

Japanese Deputy Chief Cabinet Secretary Tetsuro Fukuyama said Kan and Hu both expressed their positions on the island issue, and agreed developing strategic relations between the two countries would benefit not only the two sides but also the region and the world.

Fukuyama did not elaborate on whether the two made any progress toward reconciling those positions, but said the two leaders did agree on other broad issues, including private-sector cooperation and exchanges. He said the fact the talks were held at all showed progress.

"The formal bilateral talks mark a major step forward in improving Japan-China relations," Fukuyama said. "This is a very important time for both of our countries."

Relations between Tokyo and Beijing have been fraught after Japan arrested a Chinese fishing boat captain whose boat collided with two Japanese patrol vessels near disputed islands in the East China Sea on Sept. 7.

Japan released the captain, but Beijing demanded an apology and compensation, prompting Tokyo to demand that Beijing pay for damage to the patrol boats. The dispute sparked nationalism in both countries, with numerous demonstrations in Chinese cities in recent weeks.

Just before Hu met Kan, thousands of Japanese protesters gathered for an anti-China rally near the summit venue, waving Japanese flags and shouting "defend our territory" and "defeat Chinese imperialism."

Though the group that organized the protest is right-of-center, emotions have been high among a broad swath of Japanese who feel their country — which invaded and colonized parts of China during World War II — is being bullied by a China newly emboldened by its economic rise and swelling international clout.

Japan is also dealing with a dispute with Russia, which claims islands to its north. In a meeting with Russian President Dmitry Medvedev right after the Hu summit, Kan protested a visit Medvedev made to one of the islands earlier this month.

Some shoppers applauded as the march passed by Yokohama's biggest train station.

In the wake of the incident, Beijing cut off ministerial-level contacts with Japan, repeatedly summoned Tokyo's ambassador to complain, and postponed talks on the joint development of undersea natural gas fields. China also quietly halted exports to Japan of rare earth metals, which are essential for making high-tech products.

Kan had brief encounters with Premier Wen Jiabao on the sidelines of meetings in Brussels, Belgium, and Hanoi, Vietnam.

Last week, a video showing the Sept. 7 collisions was leaked on YouTube, prompting concerns about a fresh flare-up of tensions. A coast guard officer who admitted posting the video is being questioned by police.

The video had been kept secret, other than an edited version shown to some legislators, angering some in Japan who thought it may be evidence of Chinese wrongdoing. The video shows the fishing boat ramming into a Japanese patrol vessel amid screams and wailing sirens.

Fukuyama said the video did not come up in the talks.

___

Associated Press writer Eric Talmadge contributed to this report.

(This version CORRECTS that Kan met briefly with Wen, not Hu, in Hanoi and Brussels.)