Chinese President Xi Jinping has postponed his visit to Japan in April, the governments of both countries said Thursday, ending weeks of speculation over whether the trip would go ahead amid efforts to contain the coronavirus epidemic.

Xi would have been the first Chinese president received by Japan as a state guest in more than a decade and was due to meet with Emperor Naruhito and hold a summit with Prime Minister Shinzo Abe.

But preparations have been hindered by the new coronavirus, which has killed more than 3,000 and infected around 90,000, mostly in mainland China.

Yoshihide Suga, Japan's top government spokesman, said the countries had agreed that Xi's visit would take place at a time that "suits both sides" and to remain in close contact to work out the details.

(Japanese Prime Minister Shinzo Abe (L) and Chinese President Xi Jinping)

Related coverage:

New coronavirus outbreak may lead to cancellation of Xi's visit to Japan

Japan's coronavirus bill likely to clear lower house on March 12

China adds 139 new virus cases as death toll tops 3,000

N.Y. college students in Japan to be recalled over virus: governor

With Japan's hands full through the summer with the upcoming Tokyo Olympics, the visit may be pushed back to the fall or later.

The trip, which would have entailed a lavish banquet at the Imperial Palace, was meant to underscore recent improvements in bilateral relations following years of enmity over a territorial dispute in the East China Sea.

The last Chinese president to be received by Japan as a state guest was Hu Jintao in May 2008.

The delay is a setback for Abe, who had hoped for a foreign policy win amid deadlocked disputes with South Korea and Russia.

Abe and Xi had been expected to sign a new political document laying the foundation for future bilateral relations, the fifth of its kind since the two countries normalized diplomatic ties in 1972.

Japan and China have developed their relations based on the principles of the four existing political documents signed in 1972, 1978, 1998 and 2008. The most recent stipulates the two countries should promote a "mutually beneficial relationship based on common strategic interests."

But the recent spread of the coronavirus has prevented the countries from crafting the new document, diplomatic sources said, with numerous meetings between government officials being called off in recent weeks.

(A man (R) has his temperature checked at a convenience store entrance in Beijing on March 5, 2020.)

The coronavirus that causes the disease COVID-19 originated late last year in the central Chinese city of Wuhan, a major business and transportation hub with a population of about 11 million.

"The novel coronavirus pneumonia is being hard-fought by both China and Japan," Zhao Lijian, a Chinese Foreign Ministry spokesman, said in announcing the postponement.

The countries had agreed that Xi's visit "must be ensured in the most opportune time, environment and atmosphere," he said.

Bilateral relations have often been strained over wartime history and the dispute over the sovereignty of the Senkaku Islands, which China claims and calls Diaoyu.

But the countries now describe their ties as having "returned to a normal track" as they have encouraged reciprocal visits by their leaders.

"Japan and China have a number of outstanding issues, and I think it's important that we make progress toward resolving those issues through such visits," Japanese Foreign Minister Toshimitsu Motegi told reporters.

Beijing has also been eager to deepen economic cooperation with Japan, given that the world's second-largest economy has been slowing down amid a tit-for-tat trade war with the United States.

In Japan, however, some conservative lawmakers in Abe's ruling Liberal Democratic Party have pushed for Xi's trip to be cancelled, citing outstanding issues such as the human rights situation in Hong Kong and the far-western Xinjiang region, as well as the territorial row.

The following is a chronology of Japan-China relations.

Sept. 1972 -- Japan and China normalize diplomatic relations.

Aug. 1978 -- Japan and China sign peace treaty.

Aug. 1985 -- Yasuhiro Nakasone makes official visit to war-linked Yasukuni shrine, becoming first postwar Japanese prime minister to do so. The visit draws strong protests from China.

Oct. 1992 -- Emperor Akihito and Empress Michiko visit China.

Nov. 1998 -- Jiang Zemin becomes first Chinese president to make state visit to Japan.

May 2008 -- Chinese President Hu Jintao makes state visit to Japan.

Sept. 2010 -- Chinese trawler collides with two Japanese patrol ships near disputed Senkaku Islands in East China Sea.

Dec. 2011 -- Prime Minister Yoshihiko Noda visits China.

Sept. 2012 -- Noda's government brings Senkaku Islands under state control, sparking anti-Japan demonstrations across China.

May 2018 -- Chinese Premier Li Keqiang visits Japan for trilateral meeting with South Korea.

October -- Prime Minister Shinzo Abe visits China.

June 2019 -- Chinese President Xi Jinping visits Japan to attend Group of 20 summit.

December -- Abe visits China for trilateral meeting with South Korea.

March 2020 -- Xi postpones state visit to Japan amid coronavirus outbreak.