President Benigno Aquino's spokesman said Tuesday the Philippines had done all it could to avoid a violent end to a stand-off in Sabah, as Malaysia launched an assault on Filipino gunmen there.

A total of 27 people have been reported killed in clashes since the followers of Jamalul Kiram III, an heir to the Sultan of Sulu, landed there on February 12 by boat.

"We've done everything we could to prevent this, but in the end, Kiram's people chose this path," Aquino spokesman Ricky Carandang said of the gunmen, who are claiming the state for a now defunct Filipino Muslim sultanate.

A Malaysian government spokesman in Sabah said Tuesday an operation was underway to clear out the remainder of the gunmen, holed up in the village of Tanduo.

Carandang said Philippine Foreign Secretary Albert del Rosario remains in Kuala Lumpur for talks with his Malaysian counterpart on the security crisis.

Meanwhile, a Manila spokesman for Kiram, the self-proclaimed Sultan of Sulu, said the leader of the gunmen reported to him by telephone that a firefight was underway in Sabah.

"There is nothing to be done about that now," spokesman Abraham Idjirani said, stressing that the men's earlier announcement that they will fight to the end remains unchanged.

"We are not intruders. They (Malaysians) are the ones occupying our ancestral land," he said.

The Sulu sultanate's power faded about a century ago but it has continued to receive nominal Malaysian payments for Sabah under a lease deal inherited from European colonial powers.