"Let me talk to you about an important aspect of this issue: We have to change the culture of America -- show courage and compassion," McCain said. "Obama, as a member of the Illinois State Senate, voted against a law that would provide immediate medical attention to a child. He voted present on another vote where he voted against a ban on partial-birth abortion. I don't know how you vote present on some of that. That's his record, and that's a matter of his record. ... It was clear-cut votes that Obama voted in direct contradiction to the feelings and views of mainstream America."
Obama said he opposed legislation calling for a ban on late-term abortions because there was no exception to protect the life of the mother.
"If it sounds incredible that I would vote to withhold life-saving treatment from an infant, it's because it's not true," Obama said. "I support a ban on late-term abortions as long as there's an exception for a mother's health and life, and there was no exception. That was rejected and that's why I voted present. I'm willing to support such a bill as long as there's that exception."
The debate was expected to feature the most fireworks of any of the three face-to-face confrontations between McCain and Obama, and it did not disappoint.
Earlier this week, McCain's growing deficit in the polls led him to vow to "whip his [Obama's] you-know-what."
An ABC News/Washington Post poll showed Obama with a 10-point national lead. A New York Times/CBS News poll put that deficit at 14 points.
ABC News' Jake Tapper contributed to this report