Chinese President Xi Jinping goes down the stage after a speach on the opening ceremony of CICA, at Diaoyutai State Guesthouse in Beijing on 28 April, 2016. REUTERS/Kenzaburo Fukuhara/Pool

BEIJING (Reuters) - China hopes to get relations with the Philippines back on track, President Xi Jinping has told new Philippine President Rodrigo Duterte, after ties were affected by an increasingly bitter spat over territorial claims in the South China Sea.

Xi sent a message to Duterte late on Monday congratulating him on his formal election victory, and said the two countries had a long history of friendly exchanges and a deep traditional friendship, China’s Foreign Ministry said.

“The friendly, stable and healthy development of Sino-Philippine relations accords with the basic interests of both countries and both peoples,” Xi was quoted as saying in the ministry statement.

Both countries had the responsibility to deepen cooperation, he said.

“(I) hope both sides can work hard to push Sino-Philippine relations back onto a healthy development track,” Xi said.

China and the Philippines are locked in a territorial dispute in the South China Sea, a strategic waterway through which $5 trillion worth of ship-borne trade passes every year. Brunei, Malaysia, Taiwan and Vietnam also have claims.

Tension between the Philippines and China has risen as an international tribunal in the Hague prepares to deliver a ruling in the next few months in a case lodged by Manila in 2013.

The Philippines is seeking a clarification of United Nations maritime laws that could undermine China’s claims to 90 percent of the South China Sea. China has rejected the court’s authority.