A new book by the Washington Post's Bob Woodward portrays John McCain as offering a rosy assessment to the public about the progress of the troop "surge" in Iraq while privately telling U.S. officials he thought they were on the brink of losing the war.

The book, "The War Within," describes a McCain news conference after visiting the Shorja market in Baghdad in April 2007.

After touring the market, where he was protected by more than 100 soldiers, McCain said, "Things are getting better in Iraq, and I am pleased with the progress that has been made."

McCain was later mocked in some quarters after TV crews showed the extent of his protection at the market.

According to Woodward, McCain was invited to visit with Secretary of State Condoleezza Rice after he publicly made the positive comments at the market.

"Rice had expected him to reiterate his optimism, but after some pleasantries, he let loose," Woodward writes.

"We may be about to lose the second war in my lifetime," Woodward quotes McCain as saying to Rice.

Woodward writes that McCain "launched into a full-throated critique of the State Department's role" in the war effort.

That contrasts sharply with his public words at the time.

"We're just getting the third of the five brigades over to Baghdad," he told the reporters after the meeting, according to Woodward. "We are achieving some small successes already in the strategy being employed by General Petraeus and General Odierno."

As Woodward writes: "McCain did not mention his private fear that the United States was on the brink of losing."

McCain campaign senior adviser Mark Salter sought to clarify McCain's position Saturday.

"Senator McCain returned from Iraq and met with Secretary Rice to discuss the concerns of U.S. officials in Iraq that the personnel the State Department had sent to Iraq were too few and too junior," he said.

"He expressed to Secretary Rice the same opinion of the surge's prospects he had expressed in public. It would be tough, but it was the last and only chance for the U.S. to succeed in Iraq."

PALIN TRIP TO IRAQ IS IN DISPUTE

Gov. Sarah Palin's aides dismissed a report in the Boston Globe that she had not traveled to Iraq, as the McCain-Palin campaign had claimed.

Palin made an official visit to the Mideast to see troops from Alaska who were serving in Kuwait in July 2007.

There, she stopped at a border crossing with Iraq but did not visit the country, according to the Globe.

A campaign spokeswoman rebutted that report, saying Palin had traveled a quarter-mile across the border into Iraq.

Earlier, McCain aides had expressed indignation at questions about her limited foreign travel.