The debate presented a huge opportunity for the candidates to deliver their message to millions of Americans
- or make an embarrassing blunder.
Interest in Friday's debate was amplified by suspense about whether it would even take place. McCain had said he wouldn't take part unless the financial crisis was resolved, then reversed course and decided at the last minute to participate without a deal.
McCain, 72, frequently referred to his age and experience.
Sometimes he joked - at one point he waggled his eyebrows and quipped that the moderator didn't think he could hear the question
- and other times he went out of his way to mention the foreign countries he has visited and the years he has spent on Capitol Hill.
"I have a long record and the American people know me very well," he said.
But Obama, a 47-year-old serving his first term in the Senate, challenged McCain frequently and offered himself as someone who can be trusted to make sound choices.
Obama noted that he opposed invading Iraq, while McCain supported it. He said McCain has voted with the unpopular President Bush 90 percent of the time. He argued McCain backs corporate tax breaks and lax regulation that have contributed to the Wall Street economic crisis.
"We have to recognize that this is a final verdict on eight years of failed economic policies promoted by George Bush, supported by Senator McCain," Obama said.
Obama sought to connect with voters who might have doubts about a relative newcomer to national politics, a black man with an exotic name and background. He talked often about the struggles of ordinary Americans
- "the nurse, the teacher, the police officer who, frankly, at the end of each month they've got a little financial crisis going on."
In a long exchange with McCain over the Iraq war, Obama tried to avoid being seen as soft or reluctant to use force when necessary.
An early opponent of invading Iraq, he stressed that his position was prompted partly by worries that it would distract from hunting down Osama bin Laden, and he said withdrawing from Iraq now would free up resources to re-energize that hunt.
Obama suggested McCain might overreact to national emergencies, noting that the Arizona senator has talked about "extinction" for North Korea and joked about bombing Iran.
McCain accused Obama of seeking to "snatch defeat from the jaws of victory" in Iraq. He said the "surge" of U.S. troops has reduced violence there and withdrawing would destabilize the country and the entire region.
Asked what lessons he had learned from the long war, McCain said, "that you cannot have a failed strategy that will then cause you to nearly lose a conflict."
On Iraq and many other issues, McCain said Obama was naive, experienced, confused. He criticized Obama for saying he would meet with Iranian President Mahmoud Ahmadinejad without precondition. "This is dangerous. It isn't just naive; it's dangerous," McCain said.
The two bickered at times, talking over one another and throwing accusations of twisted words and false statements. But Obama sometimes acknowledged agreements with McCain
- concessions that might reinforce Obama's claim to be a politician who can find common ground and reduce confrontation in Washington.