PHOENIX, Aug. 17 -- President Obama on Monday defended his administration's new approach to the fierce fighting that rages in Afghanistan, calling it "not only a war worth fighting" but also one that "is fundamental to the defense of our people."

Speaking to the annual gathering of the Veterans of Foreign Wars, Obama praised the American troops in Afghanistan who are helping to secure the country ahead of elections there this week.

"As I said when I announced this strategy, there will be more difficult days ahead," Obama said. "The insurgency in Afghanistan didn't just happen overnight. And we won't defeat it overnight. This will not be quick. This will not be easy."

The president said that he would continue to increase the size of the military to confront problems around the globe, but he added that he rejects wasteful spending on technology that commanders insist they no longer need.

"Our defense review is taking a top-to-bottom look at our priorities and posture, questioning conventional wisdom, rethinking old dogmas and challenging the status quo," he said. "We're asking hard questions about the forces we need and the weapons we buy."

The president expressed confidence in the military's efforts in Iraq, saying that the United States has made progress in difficult circumstances. And he repeated his pledge that the gradual withdrawal of U.S. forces from Iraq will continue.

"We will remove all our troops from Iraq by the end of 2011," he promised. "And for America, the Iraq war will end."

Obama received polite applause from the veterans. The crowd's biggest reaction was to his promise that "I will not hesitate to use force to protect the American people or our vital interests."

In his speech to about 5,500 people at the convention center here, the president paid homage to the nation's veterans, and he promised that his efforts to overhaul the nation's health-care system will not affect the benefits they receive from the government.

"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 to loud applause. "No one is going to take away your benefits. That is the plain and simple truth."

Outside the convention center where Obama spoke, about a dozen people carried guns without incident, including one person with an AR-15 semiautomatic rifle slung over his shoulder, the Associated Press reported.