MANILA — An obscure, centuries-old territorial dispute between Malaysia and the Philippines erupted in violence on Friday, leaving at least 13 people dead and straining relations between the close Southeast Asian neighbors.

Malaysian security forces battled on Friday morning with about 180 Filipinos, some of whom were armed, in an effort to remove them from a remote coastal village they had occupied for two weeks in the northeastern Malaysian state of Sabah.

The Malaysian state news agency Bernama reported that 10 to 12 Filipinos died in the clash and two Malaysian police commandos were killed in a mortar attack.

The group, which represented itself as a royal militia in service of the sultanate of Sulu, which for centuries controlled the southern Philippines and part of what is now the Malaysian state of Sabah, arrived by boat on Feb. 12 to re-establish its long-dormant claim to the area.