The United States and the Philippines have reached a controversial agreement on security that will see more US personnel deployed in the archipelago.

The 10-year pact will allow for a larger military presence but the number of extra troops will be depend on exercises that are going on at any one time.

The agreement will be signed in Manila on Monday before the arrival of President Barack Obama on the last leg of his Asian tour.

It has been met with demonstrations on the streets of Filipino cities, with protesters angry at Mr Obama's visit and about closer military co-operation.

The Philippine government said the accord, called The Enhanced Defence Cooperation Agreement, would give American forces temporary access to selected military camps.

It will also allow the US to temporarily base fighter jets and ships in the country.

They stressed it does not contravene the Philippine constitution, which bans permanent American military bases.

A document seen by AP said additional troops would be deployed "on temporary and rotational basis," but the number would depend on the scale of joint military activities.

The long-closed US facility at Subic Bay could be one of the locations where troops could be encamped.

The president is to visit the Philippines during his Asian tour

US military have a long history of being stationed in the Philippines. They operated in the country during the US-Philippine war at the start of the 20th Century but the number increased during and after World War Two.

The United States withdrew its forces in 1992, after the Philippine parliament rejected a co-operation treaty.

But they returned when hundreds of American military personnel were deployed in the southern Philippines in 2002 to provide counter-terrorism training and as advisers.

They have been helping Filipino soldiers who have been battling Muslim militants for decades.

Under the new agreement, a Filipino base commander would have access to all the areas used by American forces.

Disagreements over Philippine access to the US areas had held up the agreement.

The potential advantage of having US forces in the country was underscored by Super Typhoon Haiyan, which killed 5,200 people when it swept across the country last year.

US ships had to travel for several days to reach the areas worst affected.

The Filipino government said the agreement would allow better co-ordination between US and Filipino forces and help the country respond better to natural disasters and other emergencies.

"Pre-positioned material will allow for timely responses in the event of disasters - natural or otherwise," the document said.

Analysts say the presence of US troops will also help the Philippines counter an increasingly assertive stance by China in disputed territories, which include areas occupied by the US ally.