Pensacola, Florida (CNN) -- President Barack Obama said Tuesday that the U.S. military is on track to complete its roughly seven-year combat mission in Iraq -- part of a redeployment of forces in response to changing needs at home and abroad.
He also praised members of the armed services for their role in fighting the oil disaster in the Gulf of Mexico, and promised an "unprecedented response" to what has now become a top-tier political crisis.
The president made his remarks during an appearance at the Naval Air Station here, at the conclusion of a two-day visit to the reeling Gulf region.
The armed forces are poised to end their "combat mission in Iraq this summer -- on schedule," Obama declared. "You've earned your place among the greatest of generations."
Obama spent much of his time, however, discussing the oil spill. Among other things, he compared it to a military invasion, arguing it required a fully mobilized response.
This is an assault on our shores and we're going to fight back with everything we've got," he said. The administration "will do whatever it takes for as long as it takes" to deal with the spill.
The president repeated his pledge to force BP to provide economic compensation for the economic damage caused by the spill -- a promise that was met with loud applause by the troops.
"This city and this region will recover and will thrive again," he declared. "Our nation will endure from these trials stronger than before. ... I promise you: we will not falter."
Obama made his remarks shortly before he was scheduled to return the White House, where he will deliver a prime time speech to the nation on the Gulf spill Tuesday night.