HANOI, Vietnam — Vietnam’s prime minister, Nguyen Tan Dung, accused China on Sunday of “dangerous and serious violations” in a territorial dispute that has raised anger toward China here to the highest levels in years.

Mr. Dung’s comments, which were carried in the Vietnamese state news media, were addressed to leaders of Southeast Asian countries attending a summit meeting in Myanmar. It was his strongest statement since China towed a huge oil rig into disputed waters off the coast of Vietnam this month.

“This extremely dangerous action has been directly endangering peace, stability, security, and marine safety,” Mr. Dung was quoted as saying, adding that Vietnam had acted with “utmost restraint.”

Mr. Dung’s comments were uncharacteristically spirited for the typically anodyne meetings of the 10-country Association of Southeast Asian Nations, but they failed to produce collective criticism of China. The leaders, who work by consensus, did not mention the dispute in their final statement on Sunday. Myanmar then released a statement after the meeting was over that expressed “serious concerns over the ongoing developments in the South China Sea,” but did not mention China. It called for self-restraint and the resolution of disputes by peaceful means.