Jeff Roberson, Associated Press
Democratic candidate Barack Obama speaks at a national meeting of the African Methodist Episcopal Church in St. Louis.

ST. LOUIS — Barack Obama celebrated "active faith" as an obligation of religious Americans and a chief agent of societal change while speaking Saturday to a nearly all-black roomful of churchgoers but hoping to reach far beyond them.

Making a less than two-hour stop in this battleground state, the Democratic presidential nominee implored the thousands attending a national meeting of the African Methodist Episcopal Church, one of the nation's largest and most politically and civically active black denominations, to help fix national and local ills.

He preached individual responsibility, saying he knew he risked criticism for "blaming the victim" by talking of the need for parents to help children with homework and turn off the TV, to pass on a healthy self-image to daughters, and teach boys both to respect women and "realize that responsibility does not end at conception."

But Obama's main message was the government's duty to address what he said are "moral problems" — such as war, poverty, joblessness, homelessness, violent streets and crumbling schools — and to employ religious institutions to do it.

"As long as we're not doing everything in our individual and collective power to solve the challenges we face, the conscience of our nation cannot rest," he said.

Obama, who has made history by becoming the first black major-party presidential nominee, made frequent references to the civil rights movement and continuing struggles in the black community.

"We are not constrained by the accident of birth but can make of our lives what we will," Obama said. He was greeted when he arrived in the vast hall by the most thunderous cheering, waving and screaming that he has heard all week.

It was also his most enthusiastic delivery of late, employing preacher's cadences that were interrupted frequently by "Amens" and "yes."

Obama repeatedly referenced his religious faith in terms that would be familiar to white evangelicals as well as his black audience. Obama has highlighted faith and personal story over the past week as he campaigned in one-time GOP strongholds and talked more about God, country, and service than about rival Republican John McCain.

He hopes to draw more support from evangelical Christian voters than is typical for Democratic presidential candidates. Analysts are skeptical he can do that because of his support for abortion, gay rights and other issues.

Earlier in the day as he flew from Montana to Missouri, Obama told reporters he was surprised at how the media has "finely calibrated" his recent words on Iraq, and reaffirmed his commitment to ending the war if elected.

"I was a little puzzled by the frenzy that I set off by what I thought was a pretty innocuous statement," he said. "I am absolutely committed to ending the war."

On Thursday in North Dakota, Obama said that "I'll ... continue to refine my policy" on Iraq after an upcoming trip there. With a promise to end the war the central premise of his candidacy, the Obama campaign has struggled over the past two days to push back against Republicans and others who say his recent statement could be a softening or change in policy.

Obama has always said his promise to end the war would require consultations with military commanders and, possibly, flexibility.

"The tactics of how we ensure our troops are safe as we pull out, how we execute the withdrawal, those are things that are all based on facts and conditions," he said. "I am not somebody — unlike George Bush — who is willing to ignore facts on the basis of my preconceived notions."

McCain spokesman Tucker Bounds said Obama needs to "understand that his words matter."

"We are all absolutely committed to ending this war, but on Thursday Barack Obama's words indicated that he also shared John McCains commitment to securing the peace beforehand," he said.

The Illinois senator also said he and rival-turned-ally Hillary Rodham Clinton plan to raise money together in a series of fundraisers in New York during the coming week.

Two events are scheduled for Wednesday night — one for his campaign and one to help Clinton pay off debts from her primary race against him. A third, for Obama, is a cash-collecting breakfast Thursday morning with women.

The fundraisers will be the first joint appearances by the former foes since their lovefest in Unity, N.H., on June 27.

Obama said his aides and those to former President Clinton are still arranging their first campaign appearances together. What role Bill Clinton will play in Obama's campaign has been a glaring question mark ever since the former president made comments earlier this year that Obama's supporters said injected race into the nomination contest.

Obama plans to campaign next week in North Carolina, Georgia and Virginia, all Southern states that have been the province of Republicans but where his campaign thinks he can make inroads — or even win — in part because of their large black populations.

It "would be pretty foolish" not to try, Obama said.

"Democrats can't shrink the map and win," he told reporters. "The solid South for Republicans is part of that shrinkage of the map. ... I want to be greedy."

Before leaving Montana, Obama spoke via satellite to a conference of the National Education Association, the largest teachers union.