WASHINGTON — Former Secretary of State Colin L. Powell’s endorsement of Senator Barack Obama on Sunday represented his own transformative moment in a lifelong journey through war and politics.

It was not only an embrace of a presidential candidate from the other party, but also an effort to reshape a legacy that he himself considers tainted by his service under President Bush.

The endorsement, which came after months of conversations between Mr. Powell and Mr. Obama on a wide range of foreign and domestic policy issues, made clear Mr. Powell’s dismay at the Republican Party. He said he felt that the party had become too conservative under Mr. Bush, and that Senator John McCain’s campaign was not good for the country or its reputation around the world.

In that sense, his remarks further stirred the brewing debate about the nature of the post-Bush Republican Party.

“I have some concerns about the direction that the party has taken in recent years,” Mr. Powell told Tom Brokaw on “Meet the Press” on NBC as he made his endorsement of Mr. Obama. “It has moved more to the right than I would like to see it.” In recent weeks, Mr. Powell added, “the approach of the Republican Party and Mr. McCain has become narrower and narrower.”

It will be up to the next president, Mr. Powell said, “to fix the reputation that we’ve left with the rest of the world.”

People in both parties debated the impact of Mr. Powell’s endorsement, but on a Sunday morning in Washington the conclusion was that the action revealed less about Mr. Obama and Mr. McCain than about Mr. Powell, who 13 years ago was himself thinking of trying to become president.

In saying he would vote for Mr. Obama over Mr. McCain, Mr. Powell aligned himself squarely against Mr. Bush, who has been counting on a Republican victory next month to see through his strategy of avoiding a rigid timetable for withdrawals in Iraq — the issue, more than any other, on which the president’s legacy will rest.

Mr. Powell’s role in selling the invasion, despite his frequent clashes with other members of Mr. Bush’s team about how to proceed, has also come to dominate his own place in history. In siding with Mr. Obama, who from the start was an opponent of Iraq, he seemed to be making a clear break with the more hawkish elements of the Republican Party and signaling an effort to reshape how he is judged on the war.

One major factor in Mr. Powell’s decision appeared to be Mr. Obama’s careful wooing of the former secretary of state. In recent months the two have had one face-to-face meeting and some half-dozen telephone conversations, all initiated by Mr. Obama.

A friend of Mr. Powell’s said Mr. Obama sought the advice of Mr. Powell before Mr. Obama’s trip in July to Europe and the Middle East, and has also had long discussions with him on Iraq, Iran and North Korea as well as education and health care policy. The two last spoke some two weeks ago about the worldwide economic crisis, the friend said.

In contrast, Mr. McCain met with Mr. Powell, a friend of two decades, in June, and has not spoken to him since, the friend said.

Like Mr. Obama, Mr. Powell has long represented to millions of people around the world the possibilities of the American dream. The son of immigrants from Jamaica who was born in Harlem and reared in the South Bronx, Mr. Powell earned a degree from the City University of New York and then embarked on a rapid rise through the military, perhaps the most integrated institution in American life.

He became a military assistant to Secretary of Defense Caspar W. Weinberger in 1983, national security adviser under President Ronald Reagan in 1986 and chairman of the Joint Chiefs of Staff under the first President Bush during the 1991 Gulf War.

By 1995 he was flirting with the idea of running for president, and a friend said he briefly considered leaving the Republican Party to run as an independent. But his wife, Alma, said she would worry about his safety. Mr. Powell finally announced he would not run in 1996 because it was “a calling that I do not yet hear.”

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.

Although Mr. Powell had some warm words for Mr. McCain on Sunday — he said that he admired him and that he would make a good president — friends say that Mr. Powell has felt cut out by Mr. McCain’s campaign foreign policy circle and concerned that Mr. McCain speaks too off the cuff about national security and has not taken the time to do the deeper homework required of a presidential candidate.

In addition, a friend said that when Mr. Powell met with Mr. McCain at Mr. McCain’s Arlington, Va., apartment in June, Mr. McCain spoke almost exclusively to him about the war in Iraq and the increase in troop strength, or surge, that Mr. McCain had strongly supported. Mr. Obama, who met with Mr. Powell at Mr. Powell’s Alexandria, Va., office, discussed a broader range of issues and actively solicited Mr. Powell’s expertise, the friend said.

Mr. Powell’s endorsement was such a powerful break from his past that Mr. Brokaw asked if he anticipated a role in an Obama administration, perhaps as an ambassador at large to Africa or in some role in Middle East peace negotiations.

Mr. Powell, in the practiced language of an old Washington hand, replied, “I served 40 years in government, and I’m not looking forward to a position or an assignment. Of course, I have always said if a president asks you to do something, you have to consider it.”

* By ELISABETH BUMILLER (NYT, October 20, 2008)