China and Philippines foreign affairs officials agreed to improve maritime communication and to properly manage conflicts and differences through friendly talks regarding issues around the South China Sea, according to a statement from the Chinese foreign ministry on Thursday.

China Assistant Foreign Minister Nong Rong and Philippines Foreign Ministry undersecretary Theresa Lazaro held a frank and in-depth exchange of views on the current situation while co-chairing the eighth meeting of the China-Philippines Bilateral Consultation Mechanism on the South China Sea in Shanghai, according to the statement.

In the talks, the two sides reaffirmed that the South China Sea dispute is "not the whole story of bilateral relations."

The two countries have had numerous confrontations recently in certain disputed waters in the South China Sea, with both trading accusations of provoking conflict in the economic strategic waterway.

Beijing claims sovereignty over almost the entire South China Sea, including parts of the exclusive economic zones of Brunei, Indonesia, Malaysia, the Philippines and Vietnam.

Both officials believe "maintaining communication and dialogue is essential to maintaining maritime peace and stability," according to the statement.

The two sides agreed to properly manage maritime conflicts and differences through friendly consultations, as well as properly handle maritime emergencies, the statement said.

Relations between the countries have been strained for months, but both have reiterated a commitment to dialogue.

On Tuesday, China summoned the ambassador from the Philippines and warned the country "not to play with fire" after President Ferdinand Marcos Jr. congratulated Taiwan's president-elect Lai Ching-te on his election victory on Saturday.