Riot police in the Philippines have used water cannon to disperse hundreds of demonstrators who protested against their country's signing of a US defence agreement.

The US President, Barack Obama, ended his visit to Manila on Tuesday with a reiteration for greater US cooperation with its allies in the Asia-Pacific region.

Washington and Manila signed the Enhanced Defence Cooperation Agreement shortly before Mr Obama's arrival in the Philippines on Monday.

The deal, which will have an initial 10-year term, sets the framework for increased rotation of US troops, ships and warplanes through the Philippines.

Activists say the defence agreement reverses democratic gains achieved when huge American military bases were shut down in the early 1990s.

They tried to make their way to the US embassy in Manila on Tuesday, but were stopped by riot police. At one point, the protesters ripped and burned a giant US flag.

'Allies never stand alone'

Mr Obama said the accord and his visit demonstrated his country's commitment to a "rebalancing" of resources and diplomacy towards the fast-growing region.

He also pledged US commitment to defending the Philippines against external attacks.

"Our commitment to defend the Philippines is ironclad and the United States will keep that commitment because allies never stand alone."

Mr Obama's comments came amid tensions between the Philippines and China over remote uninhabited islands in the South China Sea.

He said that while Washington did not take a position on the sovereignty of disputed territories, such issues must be addressed peacefully, not with "intimidation or coercion".

Washington has "a constructive relationship with China" and has no desire to contain or counter Beijing, he added.

Mr Obama wrapped up his two-day trip by visiting the Manila American Cemetery, where he honoured fallen US soldiers of WWII.

His visit to the Philippines was the final leg of an Asian tour that also took him to Japan, South Korea and Malaysia.

ABC/wires