At his final National Prayer Breakfast as president, Barack Obama said his Christian faith helped him overcome fear as commander in chief and that faith can help the country overcome fear.

“Like every president, like every leader, like every person, I’ve known fear,” the president said Thursday morning. “God has not given us a spirit of fear, but of power and of love and of a sound mind.”

President Barack Obama speaks during the National Prayer Breakfast on February 4,2016 in Washington, DC. President Barack Obama attended the National Prayer Breakfast, the annual meeting of the city's political and religious leaders. (MANDEL NGAN/AFP/Getty Images)

President Barack Obama speaks during the National Prayer Breakfast on Thursday in Washington, D.C. (Mandel Ngan/AFP/Getty Images)

Obama did not delve directly into politics but has often accused Republicans — including some 2016 presidential candidates — of stoking fear.

“Fear can lead us to lash out against those who are different or lead us to try to get some sinister other under control,” Obama said. “Alternatively, fear can lead us to succumb to despair, or paralysis or cynicism. Fear can feed our most selfish impulses and erode the bonds of community. It is a primal emotion, fear, one that we all experience. It can be contagious. If we let it consume us, the consequences of that fear can be worse than any outward threat.”

But Obama added that faith could conquer fear.

“Faith is the great cure for fear. Jesus is a good cure for fear,” Obama said. “God gives believers the power, the love, the sound mind, required to conquer any fear. What more important moment for that faith than right now. What better time than for these changing, tumultuous times than to have Jesus standing beside us, steadying our minds, cleansing our hearts, pointing us towards what matters.”

Speaking at the Christian event, Obama also noted that he visited the Islamic Society of Baltimore Wednesday and a Jewish event last week at the Israeli Embassy in Washington commemorating the Holocaust.

“I’ve drawn strength from witnessing … good people of all faiths who do the Lord’s work each and every day,” Obama said.