Editor's Note: Stephen Prothero, a Boston University religion scholar and author of "God is Not One: The Eight Rival Religions that Run the World," is a regular CNN Belief Blog contributor.

By Stephen Prothero, Special to CNN

A few years ago, I wrote a book decrying religious illiteracy in the U.S. population and in the U.S. government. Since that time, I have tried to demonstrate the huge cost of our ignorance of Islam in Iraq, Afghanistan and the wider Muslim world.

So it is only fair to acknowledge when U.S. officials demonstrate real religious literacy, as they have done with the death and burial of Osama bin Laden.

Over the last generation, American diplomatic and military actions overseas have been hurt by a woefully shallow understanding of Islam. Whether you were for or against U.S. military intervention in Iraq and Afghanistan, you had to admit that in each case Americans went into a country whose language they did not speak and whose culture they did not understand.

Our lack of understanding of Islam’s Sunni-Shia split, for example, cost us dearly in both wars.

As I watched the story of bin Laden’s death unfold Sunday night, I was preoccupied with the question, “What are they going to do with the body?”

If they buried it in a marked grave, that grave would almost certainly become a pilgrimage destination for Islamic extremists worldwide — a Mecca to Islamist martyrdom. If they buried it in an unmarked grave, dozens of such sites would likely turn up, each claiming to house the sacred relics of the mastermind behind the 9/11 attacks. And if they desecrated the body in any way, there would be hell to pay not only among bin Laden’s supporters, but also in the wider Muslim world.

Prothero: Burying bin Laden at sea an elegant solution

I was hoping against hope that people in the Obama administration had been considering these implications. And apparently they were.

At some point between the moment this special operation was planned and the moment it was completed, U.S. officials went to the trouble to learn that when a Muslim dies, the body is washed, wrapped in a white cloth and buried. They also learned that prayers are said over the body before it is laid to rest.

U.S. officials then put this education into action in a manner that was both in keeping with Islamic customs and in U.S. national interests.

Everything they did underscored a point former President Bush and President Obama have made repeatedly: that the United States is at war not with Islam but with terrorism.

By giving bin Laden’s body a burial in the Arabian Sea, they prevented his followers from turning any specific site into a sacred place where they could visit his body and dedicate their own bodies to his cause. But by giving him a proper Islamic burial, they showed respect for Islam.

Muslims will of course disagree about whether a sea burial was proper in this case. From an Islamic perspective, land burial is clearly preferable, but burial at sea is allowed in exceptional cases. The only question here is whether this was sufficiently exceptional.

What is not up for debate, however, is the fact that in this case the Obama administration and the U.S. military demonstrated real religious literacy. They should be commended for that, as well as for tracking down Osama bin Laden.

The opinions expressed in this commentary are solely those of Stephen Prothero.