Jim Lehrer, the widely respected Public Broadcasting Service news anchor, moderated the face-off between McCain, a 72-year-old veteran lawmaker and Vietnam prisoner of war, and the 47-year-old Obama.
His mission was to engage the candidates on matters of foreign affairs and national security, issues where McCain's long service in the Senate has been believed to give him an advantage.
But the US financial crisis, where polls showed Obama was clearly favored as the better candidate to reverse the slide, intruded significantly on the debate, and during the first 30 minutes the candidates focused on the economy.
Each candidate brought different goals to the first debate. Obama, who appeared aloof and professorial in Democratic primary debates, needed to assure voters he has the wherewithal to step into the president's role of commander in chief of the US military.
McCain, who opened his general election campaign emphasizing his long experience in Washington, faced the task of separating himself from fellow Republican George W. Bush, whose unpopularity has proven a major drag on the party and has only intensified as the country's financial structure crumbles.
He also had to allay concerns about his age and past bouts with skin cancer while keeping a lid on his vaunted temper.
The two men were pointed but polite, although at least once McCain sought to depict his rival as naive on foreign policy.
"I'm afraid Sen. Obama doesn't understand the difference between a tactic and a strategy," McCain said as the two traded jabs over Iraq.
Obama shot back, "I absolutely understand the difference between tactics and strategy. And the strategic question that the president has to ask is not whether or not we are employing a particular approach in the country once we have made the decision to be there."
"Incredibly, incredibly Sen. Obama didn't go to Iraq for 900 days and never asked for a meeting with Gen. (David) Petraeus," McCain said, criticizing Obama for not supporting the surge, an increase of about 30,000 troops to Iraq in early 2007.
"John, you like to pretend like the war started in 2007," Obama shot back. "You talk about the surge. The war started in 2003, and at the time when the war started, you said it was going to be quick and easy. You said we knew where the weapons of mass destruction were. You were wrong."
Sitting down with Iran
McCain also criticized Obama for having said he would sit down without precondition with Iranian President Mahmoud Ahmadinejad. McCain said that Obama would give "credence in the world arena" If he met with the Iranian leader.
"So let me get this right, we sit down with Ahmadinejad and he says 'we're going to wipe Israel off the face of the earth' and we say, 'no you're not.' Oh please," McCain said, later adding, "We cannot allow another Holocaust."
Obama agreed that the United States "cannot tolerate a nuclear Iran," calling for tougher sanctions from a range of countries including Russia and China. He also said he would not necessarily promise to meet Ahmadinejad, because he is not Iran's top leader.
"But I reserve the right, as president of the United States to meet with anybody at a time and place of my choosing if I think it's going to keep America safe," Obama said.
The debate lasted for 97 minutes, divided into nine segments of nine minutes each. A CNN poll later determined that 58% of those surveyed believed Barack Obama emerged victorious from the debate, while just 37% thought John McCain had won.
The candidates are scheduled to debate twice more, at Belmont University in Nashville, Tennessee, on Oct. 7 and at Hofstra University in Hempsted, New York, on Oct. 15.