BEIJING (Reuters) - Putting aside the usual rancour between the two countries, China’s President Xi Jinping has sent a message of condolence to Japan’s emperor over a series of earthquakes that hit Japan over the past few days.

A woman cries as she looks at her collapsed house caused by an earthquake in Mashiki town, Kumamoto prefecture, southern Japan, in this photo taken by Kyodo April 17, 2016. Mandatory credit REUTERS/Kyodo

Xi said he was shocked by the news of the quakes which have caused a heavy loss of life and damage, China’s foreign ministry said late on Monday.

He extended condolences to bereaved families and the injured, and said he hoped Japanese people would overcome their difficulties and rebuild their homes.

The earthquakes, measuring up to 7.3 in magnitude, struck Japan’s southwestern island of Kyushu from Thursday, killing at least 42 people and forcing major companies to close factories.

China, the world’s second-largest economy, and Japan, the third-largest, have a difficult political history, with ties strained by the legacy of Japan’s World War Two aggression and conflicting claims over a group of uninhabited East China Sea islets.

Ties have been thawing recently, with meetings between Japanese Prime Minister Shinzo Abe and Xi, but Beijing remains deeply suspicious of Japan, particularly of moves by Abe to allow the military to fight overseas for the first time since the war.