mlk.jpgWASHINGTON (AP) – President Barack Obama on Sunday recalled the work of slain civil rights leader Martin Luther King Jr. as he urged those packing a Baptist church to take heart in hard times and celebrate progress – however small.

On the eve of the federal holiday marking King's birth, the first African-American president said he learned – as did the civil rights leader – to rely on his faith even as he felt the "sting of criticism" during his first year as president.

"During those times it's faith that keeps me calm," he said.

Obama pointed specifically to his attempts to move the country out of the deepest economic downturn since the Great Depression while pressing for an overhaul of the health care system.

Speaking to an enthusiastic congregation of nearly 300 people at the Vermont Avenue Baptist Church, founded in 1866 by former slaves, Obama called King and those who fought with him for civil rights the "Moses generation." He exhorted parishioners – those he termed the "Joshua generation" – to "get back to basics" as Americans faced the challenges of a "new age."

Obama encouraged those in the audience to learn from previous the generations' firm resolve, belief that government can be a force for good and commitment to universal ideals.

"Our predecessors were never so consumed with theoretical debate that they couldn't see progress when it came," Obama said. "Sometimes I get a little frustrated when folks just don't want to see that even if we don't get everything, we're getting something."

In his remarks at the Washington church, Obama reflected on the difficulties he has faced in pushing key elements of his legislative agenda through Congress and the periodic distractions that have arisen from remarks about his race.

Referring to the "post-racial" and "post-partisan" shift in the country that many observers predicted would flow from his inauguration a year ago, he said, "That didn't work out so well."

But Obama urged listeners to have faith that things would slowly improve.

"Each season, the frost melts, the cold recedes, the sun reappears; so it was for earlier generations and so it will be for us," he said.

Later the president headed to Boston in support of the Senate candidacy of state Attorney General Martha Coakley, who is in a tight race for the seat long held by Sen. Edward M. Kennedy, who died in August. Coakley's defeat would upend the Democrats' 60-vote majority in the Senate, making it impossible to overcome a filibuster that could kill hard-fought health care legislation.

Obama was accompanied to the church by first lady Michelle Obama and their daughters, Sasha and Malia.

King himself spoke in 1956 at Vermont Avenue Baptist Church, located just over a mile north of the White House.

Then a 27-year-old preacher who was emerging as a prominent voice in the civil rights movement, King visited Washington shortly after the Supreme Court sided with a ruling that led to the end of racial segregation aboard city buses in Montgomery, Ala. King was one of the leaders of a bus boycott that lasted more than a year.

Monday's King holiday is the first that Obama, the first black president, commemorates as the nation's leader.

Pictured above is Martin Luther King Jr.