BEIJING — China and the 10 countries in the Association of Southeast Asia Nations have agreed on the rough outline of a legally binding code of conduct designed to prevent clashes in the strategic South China Sea, officials said.

Chinese Vice Foreign Minister Liu Zhenmin was quoted in state media Friday as saying the agreement laid a “solid foundation” for further negotiations.

“All parties have vowed to continue to constructively advance the negotiations” toward the early conclusion of the code of conduct, Liu was quoted as telling Xinhua News Agency following Thursday’s meeting in the southern Chinese city of Guiyang.

The Philippines welcomed the finalization of the draft of the framework. It contains elements that the parties agreed upon and will be presented to Chinese and ASEAN foreign ministers in August for consideration, the statement from the Philippine Department of Foreign Affairs said.

Singapore’s Ministry of Foreign Affairs Permanent Secretary Chee Wee Kiong said the sides hoped that would produce needed “political support” from the ministers.

No details were given and Liu said the text of the framework agreement would remain secret for now. No date was given for the adoption of a full code of conduct.

Also Friday, Liu and the Philippines ambassador to Beijing Jose Santiago “Chito” Santa Romana were to meet separately to discuss an agenda for future talks on their dispute over islands and waters in the eastern portion of the South China Sea.

China was enraged by a ruling last year from a Hague tribunal invalidating most of its South China Sea claims in a case brought by the Philippines. Philippine President Rodrigo Duterte has downplayed that ruling as part of his push for a broad improvement in relations between the sides since taking office in June that has cast a shadow over Manila’s ties to its longtime ally, the United States.

Despite the thaw in relations, China protested a visit last month by Manila’s defense and military chiefs to a disputed island in the South China Sea. The Philippine government maintained that it owns the territory where Filipino troops and villagers have lived for decades.

At a briefing in Beijing earlier this week, Romana said the sides had “turned a new page” on dealing with their South China Sea issues.

“Generally, the situation has eased in terms of tensions between the Philippines and China,” he said, citing regained access by Philippine fishermen to Scarborough Shoal after years of being blocked by Chinese ships.

“It does not mean the differences have disappeared. As (Duterte) told President Xi (Jinping), there will still be problems, but we are willing to discuss the issues with the Chinese side and he is optimistic that the bilateral negotiations and bilateral dialogue is the way to go,” Romana said.

China and the members of ASEAN committed 15 years ago to signing a code of conduct, but progress has been slow amid disputes over the body of water that China claims virtually in its entirety.

In the absence of such an agreement, they have followed a separate document called the Declaration on the Conduct of Parties in the South China Sea, or DOC, which among other provisions, commits the parties to “exploring ways for building trust and confidence … on the basis of equality and mutual respect.”

Along with the Philippines, ASEAN members Malaysia, Vietnam and Brunei also maintain claims in the South China Sea that overlap with those of China and Taiwan.

An estimated $5 trillion in global trade annually passes through the South China Sea, which is also home to rich fishing grounds and a potential wealth of oil, gas and other natural resources.