Canberra, Australia (CNN) -- President Barack Obama traveled to Indonesia on Thursday after spending two days in Australia, where he declared that the United States will increase its military presence and expand its role in shaping the Asia Pacific region.
"Our enduring interests in the region demand our enduring presence in this region," Obama told the Australian Parliament. "The United States is a Pacific power, and we are here to stay."
He announced an agreement with Australia on Wednesday that will expand military cooperation between the longtime allies and boost America's presence in the region.
In a speech a day later, Obama made it clear that the military expansion is a top priority in the wake of the Iraq and Afghanistan wars, even as the United States faces the need to reduce mounting federal deficits and debt.
"As we end today's wars, I have directed my national security team to make our presence and missions in the Asia Pacific a top priority," Obama said. "As a result, reductions in U.S. defense spending will not -- I repeat, will not -- come at the expense of the Asia Pacific."
The speech on the second day of his two-day trip to Australia, Obama's first as president, signaled a policy objective to compete head-on with China for influence in the region while also providing security assurances for allies.
Deputy National Security Adviser Ben Rhodes told reporters that the policy comes in part from nations of the region seeking increased U.S. presence.
"The ability of the United States to help respond to contingencies is something that has been welcomed in recent years, whether, again, it was work that we're doing in the Philippines to counter violent extremism, work that we're doing to counter piracy in the region, the response to the tsunami in Indonesia," Rhodes said. "So in other words, there's a demand signal from the nations of the region, and this is something that we're doing in concert with one of our closest allies. So we believe it's not just entirely appropriate, but an important step to dealing with the challenges of the future of the Asia Pacific region."
Under the military agreement announced Wednesday, up to 250 U.S. Marines will be sent to Darwin and the northern region of Australia for military exercises and training. Over the next several years their numbers are expected to climb to 2,500 -- a full Marine ground task force.
In addition, Air Force Maj. Gen. Michael Keltz, director of strategic planning and policy for the U.S. Pacific Command, told journalists in a telephone call Wednesday from Hawaii that the United States has based some of its most sophisticated weapons in the Pacific, including squadrons of F-22 fighters and C-17 transport planes.
The F-22s provide leading-edge technology for potential air-to-air combat as well as cyber- and electronic warfare," Keltz said. They replaced older F-15s, he added.
While U.S. officials cited the need to respond to regional natural disasters as a reason for the agreement, concern over China's military expansion is widely acknowledged as a driving factor.
"What we look at is how does our general force posture allow us to protect U.S. interests, protect our allies, and ... secure the region broadly," Rhodes said. "China is obviously a piece of the Asia Pacific region, an emerging power."
Rhodes later added that the deal is "part of the U.S. sending a signal that we're going to be present, that we're going to continue to play the role of underpinning security in this part of the region. Part of that context is a rising China."
In China, a foreign ministry spokesman questioned the appropriateness of an increased U.S. military presence in Australia.
Analysts note that the deal sends a message to China in a less confrontational way than building up bases closer to Chinese shores.
"The Chinese can squawk about it," said Patrick Cronin, senior director of the Asia-Pacific Security Program at the Center for a New American Security. "But it's not like having an aircraft carrier in the Yellow Sea."
Obama said during a Wednesday news conference that "the notion that we fear China is mistaken."
Before departing Australia, the president, along with some U.S. Marines, visited a military base in Darwin. While speaking to the troops there, Obama thanked them for their service and praised the two nations' alliance, which is now 60 years old, and said he looks forward to a deepening of the alliance.
Going forward, our purpose is the same as it was 60 years ago -- "the preservation of peace and security. And in a larger sense, you're answering the question once posed by the great Banjo Paterson. Of Australia, he wrote, "Hath she the strength for the burden laid upon her, hath she the power to protect and guard her own?"
The president's Australian visit -- postponed twice in 2009 and 2010 due to the massive oil spill in the Gulf of Mexico and other domestic political considerations -- highlights a changing balance of power in the Pacific as China expands its military reach and the United States works to reduce its military footprint in Japan.
Obama's Australian visit comes on the heels of last weekend's 19-nation Asia-Pacific Economic Cooperation summit, which highlighted the need for new measures supporting job growth. During the Hawaiian summit, Obama stressed the importance of the Pacific to global economic security, and he pushed China to do more to help strengthen the world economy.
CNN's Charley Keyes, Tom Cohen and Alan Silverleib contributed to this report