[cnn-photo-caption image= http://i2.cdn.turner.com/cnn/2008/images/09/26/art.debate.ms.gi.jpg caption="McCain and Obama trade attacks over Iraq."]
OXFORD, Mississippi (CNN) - Sen. John McCain and Sen. Barack Obama disagreed sharply over Iraq at their first presidential debate on Friday, drawing starkly different lessons from the controversial war.
"We should never hesitate to use military force ... to keep the American people safe," McCain, an Arizona Republican, argued. "But we have to use our military wisely and we did not use our military wisely in Iraq."
The next president will have to decide when and how to leave Iraq and what the United States will leave behind, McCain said.
But he said the United States was now winning thanks to a great general and a new strategy.
"Senator Obama refuses to acknowledge that we are winning in Iraq,"McCain said of his Democratic opponent, Sen. Barack Obama.Obama responded: "That's not true, that's not true."
He blasted McCain as having been wrong about the initial phase of the war, saying McCain had failed to anticipate the uprising against U.S. forces and violence between rival religious groups in the country.
"At the time when the war started, you said it was quick and easy. You said we knew where the weapons of mass destruction were," Obama said, citing the key White House policy justifying the 2003 invasion.
"You were wrong. You said that we were going to be greeted as liberators. You were wrong," he said.