SHANGHAI  - China on Thursday released a seized Japanese ship after its owner paid $28 million in compensation, a court said, in a business dispute dating to the 1930s which underlines tensions between the countries.

The Shanghai Maritime Court announced Saturday it had impounded a large freighter owned by Mitsui O.S.K. Lines in accordance with the law, as the Japanese company had failed to compensate a Chinese firm for two ships chartered in 1936.

But the case had political overtones given uneasy ties between the two Asian giants, strained by a territorial dispute over islands in the East China Sea and China’s perception that Japan has failed to make amends for atrocities committed during World War II.

“The court has delivered a ruling at 8:30 am on April 24, 2014, to lift the detention of the Baosteel Emotion ship,” the court said in a statement.

Mitsui had “fulfilled its obligations” by paying the compensation and additional court costs of around $390,000, the court said. It did not name the Chinese party awarded the compensation.

The Japanese company said the released ship departed a Chinese port on Thursday afternoon, but warned the incident could have a “negative impact” on its business activities in China.

The ship Baosteel Emotion, designed to carry iron ore, was docked at Majishan island off Shanghai, according to Chinese media reports.

Japan had lodged a formal diplomatic protest over the seizure and warned it could “intimidate Japanese companies doing business in China”.

Tokyo believes that the seizure undermined a 1972 joint communique that normalised ties between Japan and China, in which Beijing agreed to renounce any demands for war reparations.

China has insisted that the case was purely a commercial matter, and a government spokesman said Thursday that the dispute was handled under the law.

“A Chinese court has given a ruling in accordance with law and Mitsui O.S.K. has also paid compensation in accordance with the ruling of the Chinese court,” foreign ministry spokesman Qin Gang told a regular briefing. “Therefore, the case has been handled.”

Japanese media suggested the seizure of the ship underlined China’s growing assertiveness before US President Barack Obama’s arrival in Tokyo on Wednesday on the first leg of an Asian tour.

In a separate case, Japanese trading house Marubeni said Thursday that three employees - Chinese nationals working for subsidiary Columbia Grain - might have been detained by Chinese authorities.

Qin, the foreign ministry spokesman, said he was unaware of the case.

Mitsui’s predecessor chartered two ships from a company called Chung Wei Steamship Co., now referred to as Zhongwei by mainland China, in 1936.

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

A compensation suit was later brought against Mitsui by the descendants of the founder of the Chinese company, and in 2007 a Shanghai court ordered Mitsui to pay compensation.

Mitsui said in a statement on Monday that it had been seeking an out-of-court settlement after China’s supreme court rejected its appeal against the judgement in 2011, but the vessel was “suddenly” impounded.

A Chinese academic defended the court’s move, saying the seizure was legal despite the time elapsed since the original suit was filed in 1988.

“The ruling made by Shanghai Maritime Court is indisputable,” said Lu Ming, a professor at the Shanghai University of International Business and Economics who specialises in maritime law.

“After being accepted in 1988, this case was always being handled by the court,” she said.

The ship seizure came as a set of lawsuits related to wartime forced labour have also been filed in China against Japanese companies. But the favourable ruling might not necessarily open the floodgate for compensation, Lu said.

“This is a typical business dispute case, which differs in nature from the labour compensation cases, so it’s hard to tell whether it will have any positive effect,” she said.

Last month, a Beijing court for the first time agreed to hear a lawsuit by Chinese citizens demanding compensation from Japanese firms for World War II forced labour, according to their lawyer.