For four years he was a spiritual adviser to the leader of the free world.
Now, Joshua DuBois, a 30-year-old Pentecostal minister, is moving on from politics and bearing witness to the power of Christian faith inside the White House he served.
President Obama is "a deeply faithful president and didn't need a whole bunch of help cultivating that faith," DuBois said in an interview with ABC News recently outside St. John's Episcopal Church, where the Obama family worshipped on Easter.
"He begins his morning with a devotional that I send him every day. He worships at churches… as often as he gets a chance to, but he also lives out his faith in the way he serves this country," he said, "prioritizing the poor and vulnerable and making sure to spend time with his own family."
DuBois' account sheds new light on a president whose practice of faith has been relatively private and subdued, particularly in comparison to the more outwardly public religious displays of many of his predecessors.
Until he stepped down earlier this year, DuBois was the only ordained member of Obama's inner circle, a role that won him the informal title of "pastor in chief" and "Obama's man of God." He was also one of the youngest and longest-serving members of the first Obama administration, tapped at 26 to run Faith-Based and Neighborhood Partnerships, an office established by President George W. Bush to coordinate government outreach to faith-based groups.
DuBois has become perhaps most widely known for his practice of emailing the president daily devotionals, which Obama recently described as a "snippet of Scripture for me to reflect on" by BlackBerry.
But occasionally, DuBois revealed, the president would -- of his own volition -- request suggested Bible readings "for his personal use or as he's reflecting on important issues to the nation."
"He spent a lot of time thinking about the Book of Job and Job overcoming trials," DuBois said of his most frequently recommended reading for the president, an Old Testament prescription for suffering that is considered among the most eloquently written parts of the Bible.
"We also spent a lot of time in the prophets, particularly the prophet Isaiah," he added. "But we reflects on some theologians as well, like C.S. Lewis and Howard Thurman," the African-American author and civil rights leader.
Private scriptural reflection aside, DuBois said President Obama views his "Christian walk" as extending beyond the traditional measures of faith, such as church attendance, evangelization and religious ritual.
"I think that he considers spending time with his daughters and tucking them in at night, and reading them a good night story, and being there for his wife as much as possible and being a mentor and a friend to so many in the White House and comforting the nation in times of need" as outgrowths of that walk, he said.
Instead of going to church every Sunday, Obama would occasionally summon pastors to him, according to DuBois. The private Oval Office prayer sessions, with some pastors dialing in by phone, were rarely listed on his public schedule.
Pastor Joel Hunter of Northland Church in Longwood, Fla.; Bishop T.D. Jakes; Rev. Sharon Watkins; and Bishop Vashti McKenzie were regular attendees, DuBois said.
The biggest test of Obama's personal faith came late in his first term, when a gunman massacred 20 children and 6 others at Sandy Hook Elementary School in Newtown, Conn., in December.
Obama described the shooting and its aftermath as the worst days of his presidency. It also proved spiritually challenging, DuBois said, including an emotionally wrenching visit to Newtown to meet privately with families of the victims.
"Seeing the strength of those families face to face in those quiet moments, seeing [not only] the depth of their pain, but also the height of their resilience was something that I'll never forget," said DuBois, who accompanied the president on the Dec. 16, 2012, trip.
"I will also never forget what it took for the president to be a comforter over and over again to folks that had experienced unimaginable loss," he said. "He poured out his heart both in his public speech and behind the scenes in his private conversations."
Obama meditated on 2 Corinthians 4:16-5:1 "during and after Newtown" to draw strength as a "comforter," DuBois said. The Bible passage reads in part: "Do not lose heart. Though outwardly we are wasting away, inwardly, we are being renewed day by day."
While some critics have questioned the depth of Obama's religious convictions and his identity as a Christian, DuBois said the skepticism never appeared to unsettle the president's spirituality behind the scenes.
"People are going to believe any range of things about any leader of the country," DuBois said.
Obama has been dogged by conspiracy theorists who invoke his upbringing in Southeast Asia to claim he's a closet Muslim. Other critics have exploited his ties to controversial former pastor Rev. Jeremiah Wright to suggest he harbors anti-American sentiment.
"All the president can do is live out his Christian walk every single day," DuBois said. "The detractors will do their detracting, but at the end of the day it's about his relationship with God and that relationship, from all that I can tell, is strong."
One sign of that faith, according to DuBois, as Obama's establishment of a new White House tradition of a prayer breakfast to mark the Easter holiday.
"The White House had marked other religious holidays for diverse communities before, but never a day specifically focused on the Resurrection, on what the story of Jesus, the death and resurrection of Jesus, meant for the president and for the world," he said. This year's prayer breakfast will be held Friday.
Later this year, DuBois plans publish a book for leaders based on the devotionals he shared with Obama; it will be called "The President's Devotionals."
This fall, he will also begin teaching a course on multi-faith leadership at New York University and launch a new consulting firm, "Values Partnerships," to help state and local governments partner with faith-based groups to tackle social challenges.
"We think that there are great synergies between the private sector and the faith and non-profit community and we're going to help pull those together for both public good and private impact," he said.