It is inherent in the American character to aspire to greatness, so it can be disorienting when the nation stumbles or loses confidence in bedrock principles or institutions. That’s where the United States is as it prepares to select a new president: We have seen the government take a stake in venerable private financial houses; we have witnessed eight years of executive branch power grabs and erosion of civil liberties; we are still recovering from a murderous attack by terrorists on our own soil and still struggling with how best to prevent a recurrence.

We need a leader who demonstrates thoughtful calm and grace under pressure, one not prone to volatile gesture or capricious pronouncement. We need a leader well-grounded in the intellectual and legal foundations of American freedom. Yet we ask that the same person also possess the spark and passion to inspire the best within us: creativity, generosity and a fierce defense of justice and liberty.

The Times without hesitation endorses Barack Obama for president.

Our nation has never before had a candidate like Obama, a man born in the 1960s, of black African and white heritage, raised and educated abroad as well as in the United States, and bringing with him a personal narrative that encompasses much of the American story but that, until now, has been reflected in little of its elected leadership. The excitement of Obama’s early campaign was amplified by that newness. But as the presidential race draws to its conclusion, it is Obama’s character and temperament that come to the fore. It is his steadiness. His maturity.

These are qualities American leadership has sorely lacked for close to a decade. The Constitution, more than two centuries old, now offers the world one of its more mature and certainly most stable governments, but our political culture is still struggling to shake off a brash and unseemly adolescence. In George W. Bush, the executive branch turned its back on an adult role in the nation and the world and retreated into self-absorbed unilateralism.

John McCain distinguished himself through much of the Bush presidency by speaking out against reckless and self-defeating policies. He earned The Times’ respect, and our endorsement in the California Republican primary, for his denunciation of torture, his readiness to close the detention center at Guantanamo Bay, Cuba, and his willingness to buck his party on issues such as immigration reform. But the man known for his sense of honor and consistency has since announced that he wouldn’t vote for his own immigration bill, and he redefined “torture” in such a disingenuous way as to nearly embrace what he once abhorred.

Indeed, the presidential campaign has rendered McCain nearly unrecognizable. His selection of Sarah Palin as his running mate was, as a short-term political tactic, brilliant. It was also irresponsible, as Palin is the most unqualified vice presidential nominee of a major party in living memory. The decision calls into question just what kind of thinking -- if that’s the appropriate word -- would drive the White House in a McCain presidency. Fortunately, the public has shown more discernment, and the early enthusiasm for Palin has given way to national ridicule of her candidacy and McCain’s judgment.

Obama’s selection also was telling. He might have scored a steeper bump in the polls by making a more dramatic choice than the capable and experienced Joe Biden. But for all the excitement of his own candidacy, Obama has offered more competence than drama.

He is no lone rider. He is a consensus-builder, a leader. As a constitutional scholar, he has articulated a respect for the rule of law and the limited power of the executive that make him the best hope of restoring balance and process to the Justice Department. He is a Democrat, leaning further left than right, and that should be reflected in his nominees to the U.S. Supreme Court. This is a good thing; the court operates best when it is ideologically balanced. With its present alignment at seven justices named by Republicans and two by Democrats, it is due for a tug from the left.

We are not sanguine about Obama’s economic policies. He speaks with populist sweep about taxing oil companies to give middle-class families rebates that of course they would welcome, but would be far too small to stimulate the economy. His ideas on taxation do not stray far from those put forward by Democrats over the last several decades. His response to the most recent, and drastic, fallout of the sub- prime mortgage meltdown has been appropriately cautious; this is uncharted territory, and Obama is not a master of economic theory or practice.

And that’s fine. Obama inspires confidence not so much in his grasp of Wall Street finance but in his acknowledgment of and comfort with his lack of expertise. He will not be one to forge far-reaching economic policy without sounding out the best thinkers and practitioners, and he has many at his disposal. He has won the backing of some on Wall Street not because he’s one of them but because they recognize his talent for extracting from a broad range of proposals a coherent and workable program.

On paper, McCain presents the type of economic program The Times has repeatedly backed: One that would ease the tax burden on business and other high earners most likely to invest in the economy and hire new workers. But he has been disturbingly unfocused in his response to the current financial situation, rushing to “suspend” his campaign and take action (although just what action never became clear). Having little to contribute, he instead chose to exploit the crisis.

We may one day look back on this presidential campaign in wonder. We may marvel that Obama’s critics called him an elitist, as if an Ivy League education were a source of embarrassment, and belittled his eloquence, as if a gift with words were suddenly a defect. In fact, Obama is educated and eloquent, sober and exciting, steady and mature. He represents the nation as it is, and as it aspires to be.