HANOI, Vietnam — Vietnam demanded China stop oil drilling operations in a disputed patch of the South China Sea, saying on Monday that Beijing's decision to deploy a deep sea rig over the weekend was illegal.

China dismissed the objections, saying the activity was being carried out in its territorial waters.

Beijing's increasingly assertive territorial claims to the waters, which are thought to have large oil and gas deposits beneath them, have angered Vietnam, the Philippines and other claimants. The region is widely seen as a potential area of conflict.

Last week, President Barack Obama signed a new defense pact with the Philippines aimed at reassuring Asian allies of American backing as they wrangle with Beijing's growing economic and military might.

The China Maritime Safety Administration posted a navigational warning on its website advising that the CNOOC 981 rig would be drilling in the South China Sea from May 4 to Aug. 15, in an area close to the Paracel Islands, which are controlled by China but Vietnam claims as its own.

China's maritime administration also said that ships entering a 3-mile (4.8-kilometers) radius around the area are prohibited.

Vietnam's foreign ministry said the area where the rig was stationed lay within Vietnam's exclusive economic zone and continental shelf as defined by the 1982 U.N. Convention on the Law of the Sea.

"All foreign activities in Vietnam's seas without Vietnam's permission are illegal and invalid," the ministry said in a statement. "Vietnam resolutely protests them."

Vietnam's state-owned oil company, PetroVietnam, demanded that China National Offshore Oil Corporation "immediately stop all the illegal activities and withdraw the rig from Vietnamese waters."

Asked about Vietnam's objections, Chinese Foreign Ministry spokeswoman Hua Chunying said the drilling was taking place in Chinese waters.

Many analysts believe China is embarking on a strategy of gradually pressing its claims in the water by seeing what it can get away with, believing that its much smaller neighbors will be unable or unwilling to stop them. Vietnam has accused Chinese ships of cutting cables to its exploration vessels and harassing fishermen, as has the Philippines.

Chinese assertiveness puts Vietnam's authoritarian government in difficult position domestically because anger at China, an ideological ally, runs deep in the country. This is exploited by dissident movements, who accuse the government of being unwilling to speak out against Beijing.

Tran Cong Truc, the former head of a government committee overseeing the country's border issues, said the latest Chinese move was especially provocative.

"This act by China is much more dangerous than previous actions such as cutting the exploration cable or fishing bans," he said.

Associated Press news assistant Zhao Liang in Beijing contributed to this report.