China and the Association of Southeast Asian Nations (ASEAN) took a step towards easing tensions in the South China Sea, state media reported Thursday, agreeing to a framework for a "code of conduct" to prevent incidents in the disputed waters. The competing claims to the sea, which is believed to sit atop vast oil and gas deposits, have for decades made it one of Asia's potential military flashpoints. The issue has come to a head in recent years as China has pursued a strategy of building artificial islands capable of supporting military facilities in the region, provoking strong reactions from other claimants as well as the US, which argues Beijing's actions threaten freedom of navigation and overflight through the strategically vital waters. The framework, which was agreed upon during a meeting of senior officials from ASEAN and China in the country's southwestern province of Guizhou, sets the parameters for a final, more detailed agreement yet to come. A draft of the text obtained by AFP describes the envisioned agreement as "a set of norms to guide the conduct of parties and promote maritime cooperation in the South China Sea," adding that it is "not an instrument to settle territorial disputes." Negotiations for an actual code have already taken 15 years. The 10-member Association of Southeast Asian Nations and China adopted a non-binding "declaration of conduct" in 2002 to discourage hostile acts. All sides agreed not to use threats or force to assert claims. But China refused to turn it into a legally binding "code of conduct", using the intervening time to build its artificial islands. Beijing claims nearly all of the South China Sea, despite partial counter-claims from Taiwan and several ASEAN members including the Philippines, Brunei, Malaysia, and Vietnam. The dispute has caused deep divisions within ASEAN, which normally seeks to operate on a consensus basis. Under former President Benigno Aquino, the Philippines had adopted a tough stance on China's claims, but the country's anger at the world's second largest economy has become a warm embrace following the election last year of President Rodrigo Duterte, who has declined to push China on territorial issues in hopes of being rewarded with investment and aid. Chinese and Philippines officials will meet in China on Friday for the first round of bilateral talks on their piece of the dispute. On Thursday, Duterte said he would be open to exploring the South China Sea's natural resources with rival claimants China and Vietnam.