"This deepening of our alliance sends a clear message of our commitment to this region," he said
Obama said his discussions with a "down-to-earth" and straight-talking Gillard also covered economic cooperation and America's ambition to create a seamless regional economy, with the proposed Trans-Pacific Partnership as a new model for trade in the region.
He said the US welcomed a rising and peaceful China.
"The notion that we fear China is mistaken.
"The notion that we're trying to exclude China is mistaken.
"The main message that I've said publicly and privately to the Chinese is that with their rise comes greater responsibility.
"When China is playing by the rules and recognising its responsibilities it's a win-win situation."
Obama, the fifth President to visit Australia, arrived late yesterday on Air Force One and drove to talks with Prime Minister Julia Gillard along Canberra streets shut down by massive security.
The two leaders, fresh from the Asia Pacific Economic Community leaders' summit and Trans-Pacific Partnership talks in Hawaii, had a broad agenda that included security, China, trade and emerging nuclear threats in North Korea and Iran.
Yesterday's military agreement was described by Defence Minister Stephen Smith as the most important development in the alliance since the 1980s agreement on joint spy bases.
Admiral Robert Willard, chief of the Pacific Command said: "Any opportunities that we have to locate forces in the Southeast Asia region relieves some pressure on that need to, at great expense, deploy and sustain forces present in Southeast Asia."
But the move has raised fears that China could see Australia as part of a new US policy of containment, with defence analysts in both countries wary of Beijing's growing power and a wide belief that much of America's new Asia Pacific focus is a response to China's rise.
Gillard dismissed the concerns before Obama's arrival, saying links with China would not be affected.
"I think it is well and truly possible for us, in this growing region of the world, to have an ally in the United States and to have deep friendships in our region, including with China."
American analysts have taken a similar line, insisting that the US is not asking Australia to take sides despite a renewed emphasis on regional allies, military muscle, and the development of a new "rules-based architecture" designed largely to ensure that China does not set the agenda.
But an increased US presence - even if through greater training and naval visits rather than permanent bases - has disturbed critics including Greens leader Bob Brown, who said the development was "troubling".
"We think that Australia should be taking an independent line on the issue of military build-up, not taking a side that might upset our neighbours from India through Indonesia right to China," he said.
Australia is treading a complex line, tightening the US alliance while at the same time lifting relations with China, whose resources-hungry economy imports more than A$85 billion ($106 billion) of Australian products a year, underwriting Australia's prosperity.
A stream of high-level Chinese politicians and officials, including President Hu Jintao and Vice President Xi Jinping, has visited Australia, and plethora of dialogues have opened to discuss issues ranging from trade and economic co-operation to human rights, defence and regional security.
Last week the Chinese Army's deputy chief of general staff, General Ma Xiaotian, was in Canberra for talks that agreed to further lift defence ties, and Australia has allowed Beijing to use a satellite ground station in remote WA to track its satellites.
Obama attended a state dinner at Parliament House last night.
As part of his welcome he met a group of schoolchildren. Emily Jagos told AAP she would remember meeting Obama "forever". Keali Tuari said she would never wash her hand again after Obama shook it.
He will speak to a joint sitting of Parliament, emphasising close ties with Australia, then head to Darwin before leaving for Bali.