He was accompanied by First Lady Michelle Obama, Vice President Joe Biden and Dr. Jill Biden, and the presidential party sat in the front pew of the church for the service, a tradition dating to the 1933 inauguration.
The interfaith service, attended by 2,200 people, included speakers from several Christian denominations as well as from Islam, Judaism and Sikhism.
The sermon was delivered by Rev. Adam Hamilton, senior pastor of the United Methodist Church of the Resurrection in Leawood, Kan., who began by joking that Obama's ability to inspire qualified him to be a preacher. Hamilton's sermon weaved the stories of Moses and Dr. Martin Luther King Jr., and called for unity and an end to partisan fighting in Washington.
He concluded by directly addressing the president, saying, "There's a lot of darkness in the world. Lead us to be a compassionate people....wait upon the Lord. He will renew your strength that you might lead us as a nation to knock holes in the darkness. Amen."
Celebrity Breakups and divorces of 2014 [PHOTOS]