"If Congress sends me a defense bill loaded a bunch of pork, I will veto it," he declared in a speech to the Veterans of Foreign Wars.
He accused members of Congress of using the defense budget to protect jobs back home, including on wasteful projects he said were diverting money needed for U.S. military forces battling everything from nuclear weapons to "18th century style piracy and 21st century cyber threats."
Obama thanked America's veterans and praised U.S. fighting forces in Iraq and Afghanistan. His speech, in the convention center in downtown Phoenix, was respectfully received by the veterans, who frequently interrupted him with polite applause.
Turning to the two current foreign wars engaging the United States, Obama spoke of fierce fighting against Taliban and other insurgents leading up to Thursday's national elections in Afghanistan. He said U.S. troops are working to secure polling places so the elections can go forward and Afghans can choose their own future.
Attaining that peaceful future "will not be quick, nor easy," Obama said.
He said the United States still has a deep interest in the long-term outcome. "So this is not only a war worth fighting. ... This is fundamental to the defense of our people," he said.
As to Iraq, Obama reiterated his commitment to remove all combat brigades by the end of next August and to remove remaining troops from the country by the end of 2011. U.S. troops withdrew from cities and other urban areas in June.
At home, Obama noted that his administration was committed to increased spending on VA health care.
"And since there's been so much misinformation out there about health insurance reform, let me say this: One thing that reform won't change is veterans' health care," he said. "No one is going to take away your benefits. That is the plain and simple truth."
Obama said he was also directing each of the 57 regional VA offices "to come up with the best ways of doing business, harnessing the best information technologies, breaking through the bureaucracy."
He said the government would then pay to put the best ideas into action "all with a simple mission cut these backlogs, slash those wait times and deliver your benefits sooner."
Assailing what he called wasteful spending, Obama told the VFW: "You've heard the stories, the indefensible no-bid contracts that cost taxpayers billions and make contractors rich."
He cited "the special interests and their exotic projects that are years behind schedule and billions over budget, the entrenched lobbyists pushing weapons that even our military says it doesn't want. The impulse in Washington to protect jobs back home building things we don't need has a cost that we can't afford."
Despite objections and veto threats from the White House, a $636 billion Pentagon spending bill was approved by a 400-30 vote in the House late last month. It contains money for a much-criticized new presidential helicopter fleet, cargo jets that the Pentagon says aren't needed and an alternative engine for the next-generation F-35 Joint Strike Fighter that military leaders say is a waste of money.
The Senate will deal with the spending measure in September.
The president laid out a vision of a nimble, well-armed and multilingual fighting force of the future, not one that was built to fight land battles against the Soviets in Europe.
"Because in the 21st century, military strength will be measured not only by the weapons our troops carry, but by the languages they speak and the cultures they understand," the president said.
He praised Sen. John McCain, the Arizona Republican and his opponent in the 2008 presidential contest, for joining him and Defense Secretary Robert Gates in opposing unneeded defense spending.
Shortly after Obama won the White House, McCain had pointedly suggested there was no need for the Marine Corps to bring on newer helicopters to ferry the president at a cost of billions of dollars.
"Now, maybe you've heard about this," Obama said of the helicopters. "Among its other capabilities, it would let me cook a meal while under nuclear attack. Now, let me tell you something. If the United States of America is under nuclear attack, the last thing on my mind will be whipping up a snack."