Mr. Powell had a tumultuous tenure as President Bush’s first-term secretary of state, when he was frequently undercut by Vice President Dick Cheney and Donald H. Rumsfeld, the secretary of defense, in the period before the Iraq war. Although Mr. Powell had major misgivings about the war and what he considered the inadequate number of troops, he not only agreed to the invasion but also made the administration’s case for war in a presentation to the United Nations Security Council in February 2003.

Much of what he said is now known to be based on false information provided by the Central Intelligence Agency. Mr. Powell has been widely criticized for the appearance, including by Mr. Obama, a fact that Mr. Brokaw brought up on Sunday.

Mr. Brokaw read aloud a passage from Bob Woodward’s most recent book, “The War Within,” that quoted former Secretary of State James A. Baker III, a Republican, as saying that Mr. Powell was “the one guy who could have perhaps prevented” the war from happening.

Mr. Powell, who friends say remains angry about his time in the Bush administration, briskly responded that “it was not a correct assessment by anybody that my statements or my leaving the administration would have stopped it.”

The fissures within the Bush administration and the fractious Republican foreign policy establishment have in the meantime played out in the 2008 presidential campaign. In many ways, Mr. Powell’s endorsement reflected the rift between the so-called pragmatists, many of whom have come to view the Iraq war or its execution as a mistake, and the neoconservatives, a competing camp whose thinking played a pivotal role in building the case for war.

Mr. Powell, who is of the pragmatist camp and has been critical of the Bush administration’s conduct of the war, was said by friends in recent months to be disturbed by some of the neoconservatives who have surrounded Mr. McCain as foreign policy advisers in his presidential campaign.

The McCain campaign’s top foreign policy aide is Randy Scheunemann, who was a foreign policy adviser to former Senators Trent Lott and Bob Dole and who has longtime ties to neoconservatives. In 2002, Mr. Scheunemann was a founder of the hawkish Committee for the Liberation of Iraq and was an enthusiastic supporter of Ahmad Chalabi, the Iraqi exile and Pentagon favorite, who was viewed with suspicion and distaste at the State Department during Mr. Powell’s tenure.