Media playback is unsupported on your device Media caption Julia Gillard and Barack Obama announce details of the new military arrangement

Australia has agreed to host a full US Marine task force in the coming years, Prime Minister Julia Gillard has announced at a news conference with US President Barack Obama in Canberra.

She said about 250 US Marines would arrive next year, eventually being built up to 2,500 personnel.

The deployment is being seen as a move to counter China's growing influence.

But Mr Obama said the US was "stepping up its commitment to the entire Asia-Pacific", not excluding China.

"The main message that I've said, not only publicly but also privately to China, is that with their rise comes increased responsibility," he said.

"It is important for them to play by the rules of the road."

Chinese foreign ministry spokesman Liu Weimin questioned whether the move was in keeping with the region's peaceful development.

Analysis Long a close ally of Washington, Australia is set to take on a growing strategic importance for the US as Mr Obama seeks to pivot America's foreign policy away from the wider Middle East towards the Asia-Pacific region as a whole. Australia approaches China with a degree of ambivalence. Beijing is Australia's biggest trading partner. But China's growing military reach is seen as at least a potential threat for the future. In his speech to parliament Mr Obama will set out his vision of a new Pacific century. A subsequent trip to Darwin on Australia's north coast will symbolise the enhanced military relationship between the two countries. It is an attempt to offset Chinese influence and to ensure that Beijing's "soft power" remains just that and does not spill over into military assertiveness.

"It may not be quite appropriate to intensify and expand military alliances and may not be in the interest of countries within this region," he was quoted as saying by AFP news agency.

The Global Times, a newspaper produced by the Communist Party-controlled People's Daily group, has been much more bellicose, says the BBC's Damian Grammaticas in Beijing.

An editorial warned it was "certain" that if "Australia uses its military bases to help the US harm Chinese interests, then Australia itself will be caught in the crossfire".

Luo Yuan, a senior officer at the People's Liberation Army's Academy of Military Sciences, told the paper that while neither the US nor China wanted to start a war, "if China's core interests such as its sovereignty, national security and unity are intruded on, a military conflict will be unavoidable".

Alliance honoured

The US president flew into Canberra from this weekend's Asia-Pacific Economic Co-operation (Apec) forum in Honolulu.

The visit comes as the two countries mark a 60-year security alliance.

Ms Gillard said about 250 Marines would be deployed on a rotational basis in northern Australia from next year.

"Australia will welcome deployments of a company-size rotation of 200 to 250 Marines in the Northern Territory for around six months at a time," she said.

"Over a number of years we intend to build on this relationship in a staged way to a full force of around 2,500 personnel, that is a full Marine air-ground task force."

Analysts said the deployment was the biggest in Australia since World War II.

Mr Obama said the deployment would allow the US to "meet the demands of a lot of partners in the region" in terms of training, exercises and "security architecture".

Later in his visit the US leader is due to visit a memorial in Darwin to honour US and Australian soldiers killed during World War II.

Mr Obama has twice cancelled visits to Australia in the past - in March 2010 as he worked to pass healthcare reform legislation and then in June the same year amid the Gulf of Mexico oil spill.

After his stop in Darwin, Mr Obama flies to Indonesia for a summit of Asian leaders.