WASHINGTON — President Obama may have thought he was giving a straightforward history lesson at the National Prayer Breakfast on Thursday when he compared the atrocities of the Islamic State to the bloodshed committed in the name of Christianity in centuries past.

But that is not how many of his longtime critics saw it.

“The president’s comments this morning at the prayer breakfast are the most offensive I’ve ever heard a president make in my lifetime,” said Jim Gilmore, the former Republican governor of Virginia. “He has offended every believing Christian in the United States.”