ALBUQUERQUE, N.M. - Republican John McCain sharply criticized Democratic rival Barack Obama yesterday for not having been to Iraq since 2006, and said they should visit the war zone together.

"Look at what happened in the last two years since Senator Obama visited and declared the war lost," the GOP nominee-in-waiting said in an interview, noting that the Illinois senator's last trip to Iraq came before the military buildup that is credited with curbing violence.

"He really has no experience or knowledge or judgment about the issue of Iraq, and he has wanted to surrender for a long time," the Arizona senator added. "If there was any other issue before the American people, and you hadn't had anything to do with it in a couple of years, I think the American people would judge that very harshly."

McCain, a Navy veteran and Vietnam prisoner of war, frequently argues that he is the most qualified candidate to be a wartime commander in chief. In recent weeks, he has sought to portray Obama, a first-term senator, as naive on foreign policy.

The Iraq war, which most of the country opposes, according to polls, is shaping up to be a defining issue in the November presidential election. McCain, who wrapped up the GOP nomination in March, supports continued military involvement in Iraq; Obama, who has all but clinched the Democratic nomination, has called for withdrawing U.S. troops.

"For him to talk about dates for withdrawal, which basically is surrender in Iraq after we're succeeding so well is, I think, really inexcusable," said McCain, who has been to Iraq eight times.

"I go back every few months because things are changing in Iraq," he said. "I would also seize that opportunity to educate Senator Obama along the way."

Obama spokesman Bill Burton declined to respond directly to McCain. "Senator Obama thinks Memorial Day is a day to honor our nation's veterans, not a day for political posturing," Burton said.

McCain, like Obama, spent part of Memorial Day in New Mexico, a general-election battleground that was decided by razor-thin margins in 2000, for Democrat Al Gore, and in 2004, for Republican President Bush.

McCain used a speech at the New Mexico Veterans Memorial in Albuquerque to press his case against withdrawing troops from Iraq. He said they should continue their mission even though he has been made "sick at heart by the many mistakes" the U.S. made at the outset.

He also defended his opposition to Senate-passed legislation that would provide additional college financial aid to veterans. The issue has become a point of contention between McCain and Obama, who supports the measure.

McCain said his opposition to the bill, sponsored by Democratic Sen. Jim Webb of Virginia, was the right stance to take. The Senate approved the measure that would greatly increase educational benefits for service members returning from Iraq and Afghanistan. Lawmakers blocked a limited version that McCain supported.

"I am running for the office of commander in chief. That is the highest privilege in this country, and it imposes the greatest responsibilities. And this is why I am committed to our bill, despite the support Senator Webb's bill received," McCain said.