The Foreign Ministry in Beijing summoned the Vietnamese ambassador, Nguyen Van Tho, to strongly protest the new law, said a spokesman, Hong Lei.

“Vietnam’s Maritime Law, declaring sovereignty and jurisdiction over the Paracel and Spratly Islands, is a serious violation of China’s territorial sovereignty,” a ministry statement said. “China expresses its resolute and vehement opposition.”

The dispute between China and Vietnam over the law, which had been in the works for years, is the latest example of Beijing’s determination to tell its Asian neighbors that the South China Sea is China’s preserve.

The Chinese statement comes two weeks before a meeting of foreign ministers of the Association of Southeast Asian Nations, or Asean, in Phnom Penh, Cambodia, which will be attended by Secretary of State Hillary Rodham Clinton. The South China Sea is expected to be high on the agenda.

To reinforce its claims, China also announced that it had raised the level of governance on three island groups in the sea: the Spratlys, the Paracels and the Macclesfield Bank, known in Chinese as the Nansha, Xisha and Zhongsha Islands.

The Chinese State Council issued a statement placing the three groups of islands and their surrounding waters under the city of Sansha as a prefectural-level administration rather than a lower county-level one.

Xinhua, the state-run news agency, quoted a Ministry of Civil Affairs spokesman as saying that the new arrangement would “further strengthen China’s administration and development” of the three island groups.

China and South Vietnam fought over the Paracels and the Spratlys in 1974, and a unified Vietnam fought briefly with China in 1988 over the islands. China controls the Paracels and reefs and shoals within the Spratlys, according to the International Crisis Group, a research organization. The Macclesfield Bank comprises a sunken atoll and reefs. In another South China Sea squabble, President Benigno S. Aquino III of the Philippines said Wednesday that he would order Philippine government vessels back to the Scarborough Shoal if China did not remove its ships from the disputed area, as had been promised.

A two-month standoff between China and the Philippines at the shoal appeared to have been defused last weekend, when a typhoon forced Philippine fishing boats and a navy vessel to leave. China pledged to remove its vessels, too, the Philippines said at the time.

But this week, Philippines officials said half a dozen Chinese government vessels and fishing boats remained at the shoal. The exact position of the Chinese boats — whether they were inside the shoal’s large lagoon, or outside the lagoon in more open waters — was not clear.

The Philippine government spokesman, Raul Hernandez, said a verbal agreement between China and the Philippines applied only to the withdrawal of vessels from the sheltered lagoon, where Chinese fishermen were poaching rare corals, fish and sharks.

“The two sides are still talking about the vessels outside the lagoon,” he told a Philippine radio station.

The Asean ministerial meeting in Phnom Penh will almost certainly come under competing pressures from China and the United States over the tensions in the South China Sea.

Last month, at an Asean session in Phnom Penh in preparation for the ministerial meeting, Cambodia, which holds the chairmanship of the regional bloc and is a close ally of China, refused to allow the issuing of a statement on the need for a peaceful resolution of the disputes.

The United States is expected to urge the association to strengthen an existing code of conduct on the South China Sea, probably over China’s objections.

Bree Feng contributed research.