FILE - U.S. President Donald Trump, right, walks with Chinese President Xi Jinping during a welcome ceremony at the Great Hall of the people in Beijing, Nov. 9, 2017.
FILE - U.S. President Donald Trump, right, walks with Chinese President Xi Jinping during a welcome ceremony at the Great Hall of the people in Beijing, Nov. 9, 2017.

History shows that cooperation is the best choice for both China and the United States, Chinese President Xi Jinping told U.S. President Donald Trump in a congratulatory message Tuesday to mark 40 years since the establishment of diplomatic relations.

The two countries are currently engaged in a truce in their bitter trade war, holding talks to try and end a dispute that has seen them level increasingly severe tariffs on each others' imports.

In his message to Trump, Xi said China-U.S. relations have experienced ups and downs and made historic progress over the past four decades, state news agency Xinhua said.

This has brought huge benefits to the two peoples and has contributed greatly to world peace, stability and prosperity, Xi added.

"History has proved that cooperation is the best choice for both sides," Xi said.

Sino-U.S. relations are in an important stage, he added.

"I attach great importance to the development of China-U.S. relations and am willing to work with President Trump to summarize the experience of the development of China-U.S. relations and implement the consensus we have reached in a joint effort to advance China-U.S. relations featuring coordination, cooperation and stability so as to better benefit the two peoples as well as the people of the rest of the world," he said.

This year marks a series of sensitive anniversaries for China, including, in June, 30 years since the bloody crackdown on pro-democracy demonstrators in and around Beijing's Tiananmen Square.

On Wednesday, Xi will make his first public appearance at an anniversary-related event, giving a speech about self-ruled Taiwan, which China claims as its sacred territory, on the 40th anniversary of a key policy statement that led to a thaw in relations with the island.