Japan's government has warned that the seizure of a Japanese ship in Shanghai over pre-wartime debts threatened its ties with China and could undermine the basis of their diplomatic relationship.

Authorities in Shanghai seized the large freight vessel in a dispute over what the Chinese side says are unpaid bills from the 1930s, when Japan occupied large areas of China.

Japan's chief government spokesman, Yoshihide Suga, says the seizure undermined the 1972 joint communique that normalised ties between Japan and China, in which Beijing agreed to renounce "its demand for war reparation from Japan".

"It could also intimidate Japanese companies doing business in China as a whole," he said.

"Japan is deeply worried and strongly expects China to take appropriate measures."

On Saturday, Shanghai Maritime Court said it had seized "the vessel Baosteel Emotion owned by Mitsui O.S.K. Lines ... for enforcement of an effective judgement" made in December 2007.

"The arrested vessel will be dealt with by the law if Mitsui O.S.K. Lines, Ltd. still refuses to perform its obligations," the court said.

Compensation dispute

Chinese and Hong Kong media said the seizure was related to a verdict by a court in Shanghai that said Mitsui must pay about 2.9 billion yen ($US28 million) in relation to the leasing of two ships nearly 80 years ago.

Reports said that in 1936, Mitsui's predecessor Daido Shipping Co. rented two ships on a one-year contract from Zhongwei Shipping Co.

However, the ships were commandeered by the Imperial Japanese Navy and were sunk during World War II, reports said.

A compensation suit was brought against Mitsui by the descendants of the founder of Zhongwei Shipping and, in 2007, a Shanghai court ordered Mitsui to pay about 2.9 billion yen in compensation.

Mitsui appealed against the decision but in December 2010 the Supreme People's Court turned down their petition for the case to be retried.

According to Japan's Kyodo News, Mitsui says it is not liable to pay compensation given that the ships which Daido rented were requisitioned by the Japanese military during the war.

It appears to be the first time the assets of a Japanese company have been confiscated in a lawsuit relating to wartime or occupation compensation, Kyodo reported.

But it comes as a set of lawsuits related to wartime forced labour in Japan have been filed in China against Japanese corporations.

A Beijing court has agreed for the first time to hear a lawsuit by Chinese citizens demanding compensation from Japanese firms over forced labour, their lawyer said last month.

"Including this incident, China's set of policies on this issue could shake up in a profound way the spirit of normalising diplomatic ties between Japan and China that is inscribed in the 1972 joint communique," Mr Suga said.

The value of Japanese companies' investment in China dropped by half in the first quarter of this year compared to the previous year, to about $1.21 billion, Chinese government data said.

It comes as the chief of Japan's navy visits China for the first time in five years to attend a regional symposium.

The gathering in Qingdao is aimed at preventing unintended military clashes in the region, including the South China Sea, where Beijing has territorial disputes with several countries, and the East China Sea, where it claims sovereignty over Tokyo-administered islands.

"If participating countries can establish common rules between their warships and jets, that would be effective", Japanese navy chief Katsutoshi Kawano said.

Shrine offering further strains ties

Japanese prime minister Shinzo Abe (centre) visits the Yasukuni shrine for war dead in Tokyo on December 26, 2013. ( Reuters: Toru Hanai )

Meanwhile, Japan's prime minister Shinzo Abe has sent a ritual offering to the controversial Yasukuni war shrine on Monday, angering both South Korea and China.

China's official Xinhua news agency says Mr Abe's offering is a provocative move that threatened regional stability, akin to a "slap in the face of the leader of Japan's closest ally".

South Korea's foreign ministry has also condemned the offering.

"We deplore the fact that prime minister Shinzo Abe has romanticised Japanese colonialism and its war of aggression by paying tribute to the Yasukuni Shrine," the ministry said in a statement.

Mr Abe has said that, like predecessors such as former premier Yasuhiro Nakasone who visited the shrine, he had high regard for Japan's ties with China and South Korea, which suffered under Japanese occupation and colonisation in the 20th century.

China protested on April 12 after internal affairs minister Yoshitaka Shindo visited the shrine, where 14 Japanese leaders, convicted as war criminals after World War II, are honoured along with Japan's war dead.

A group of politicians is also expected to visit the shrine during the country's spring festival this week.

Mr Suga says the prime minister made his latest offering to the shrine as a private individual so it was not the government's place to comment.

"It will not have an impact on the US-Japan leaders meeting," he said.

US president Barack Obama's three-day visit to Japan begins on Wednesday.

The United States has said it was "disappointed" with Mr Abe's shrine visit last year, which angered Beijing and Seoul.

AFP/Reuters