President Obama did not miss the moment. From the generally positive overnight reaction, Obama's speech in Tucson on Wednesday night struck just the right notes. Amid grief over a senseless tragedy and against a raging debate that threatened to further divide the country, the president urged healing and reconciliation.

The role of mourner-in-chief is relatively new in the history of the presidency, but it is now an important part of the job description for anyone who seeks the nation's highest office. In times of tragedy, people turn to presidents to help soothe the pain and bind the wounds, to give hope at times where there is little or resolve when it is needed.

Ronald Reagan did it with a short and eloquent Oval Office address the night that the shuttle Challenger exploded shortly after takeoff in 1986. Bill Clinton did it with a pointed and yet uplifting speech at a memorial after the Oklahoma City bombing in 1995. George Bush did it after Sept. 11, 2001, first at Washington National Cathedral with sobering words at a somber ceremony and later that day from the rubble of Ground Zero with belligerence offered through a bullhorn.

Obama had been there before - after the massacre at Fort Hood in the first year of his presidency and after the coal mine disaster in West Virginia last spring. But Tucson presented a unique challenge, with a congresswoman the target of the attack in a state that has been roiled politically by violence, hot rhetoric and strong actions that had drawn national attention and condemnation.

Wednesday's event in Tucson was billed as a memorial service to the six dead and the many wounded, including Rep. Gabrielle Giffords (D-Ariz.), who remains in critical condition after being shot in the head. It became something else, unsettling to some - a moment of release for a community still in shock, a pep rally of sorts complete with cheers and applause and whistling at every line from every speaker that was meant to convey hope and optimism. It was anything but the somber service that many people may have expected.

Before the speech, White House officials told reporters the president's remarks would mostly focus on the victims. While partly true, their description mischaracterized the totality of what Obama decided to try to do with his time on the stage. Without assigning blame and in words shorn of partisanship, he delivered a political message. He asked all Americans to use the tragedy to make themselves and the country better - as a way of paying tribute to those who had been killed or wounded.

"The loss of these wonderful people should make every one of us strive to be better in our private lives - to be better friends and neighbors, co-workers and parents," he said. "And if, as has been discussed in recent days, their deaths help usher in more civility in our public discourse, let's remember that it is not because a simple lack of civility caused this tragedy, but rather because only a more civil and honest public discourse can help us face up to our challenges as a nation, in a way that would make them proud."

The president's speech was unique, given the circumstances. It was lengthy - more than 30 minutes - when most presidents have chosen to be brief. It was not partisan but it was political, causing some negative reaction. Most important, it offered Obama an opportunity to reprise the message of unity and hope that first made him a national figure. If he offered implicit criticism of what has transpired since the shootings, it was aimed as much at those on the left who have sought to link the shootings to right-wing rhetoric.

He said: "At a time when our discourse has become so sharply polarized - at a time when we are far too eager to lay the blame for all that ails the world at the feet of those who think differently than we do - it's important for us to pause for a moment and make sure that we are talking with each other in a way that heals, not a way that wounds."

Whether Obama's speech changes the trajectory of his presidency will be a subtopic of the post-Tucson political discussion. For all the reasons that people now point to Clinton's Oklahoma City speech as a turning point in his fortunes after the Democrats' debacle of 1994, many now will look to see whether Tucson proves that kind of moment for Obama.

Perhaps. The circumstances of the two events do not provide a neat comparison, given that the bombings were the acts of anti-government terrorists and the Tucson shootings appear to be the work of a deranged man with no clear political identity. More than public reaction to Obama's speech will determine its effect on his presidential fortunes. As important is how Obama internalizes this episode in the context of how he governs.

The political debate that erupted within hours of Saturday's shootings was a reminder of the depth of the divisions in the country today. Obama sought to elevate himself out of that climate of apportioning blame, as presidents can do in such circumstances. It is where he appears most comfortable as a politician but, as his presidency has shown, not an easily maintained position. In his first two years, he was unable to change the tone in Washington, as he had promised.

Policy debates await him that will soon thrust him back into the political and partisan realms, where he has sometimes proved thin-skinned and defensive. His calls for civility and unity will bump against the real differences that divide the two parties. Those times will test whether he can continue to unify the country or change the tone, or at least command a real majority.

The contrast between Obama and Sarah Palin was especially striking. Wednesday was a textbook example of how two politicians chose to handle a moment of national tragedy. Perhaps by an accident of timing, Palin put herself into the same news cycle as the president. After several days of silence, she offered her first extended commentary on the shootings.

Much of what she said was proper, but not all. Michael Gerson, who was Bush's chief speechwriter and has been no fan of Palin, observed on CNN Wednesday night that her speech was "seven minutes Reagan and 30 seconds Spiro Agnew." Her careless use of the charged words "blood libel" to criticize those who she believed had unfairly attacked her and other conservatives created more controversy, not less.

Obama has proven to be a polarizing figure in office, but on Wednesday he sought to unify. Palin ended up dividing. On a day of scripted messages, presumably carefully considered, Obama made the most of his. Palin did not.