Neil Armstrong will be remembered at Washington National Cathedral today. It's a good moment to look at one eccentric Apollo story: the tale of Aldrin's hushed-up communion on the moon.

Before Armstrong and Aldrin stepped out of the lunar module on July 20, 1969, Aldrin unstowed a small plastic container of wine and some bread. He had brought them to the moon from Webster Presbyterian church near Houston, where he was an elder. Aldrin had received permission from the Presbyterian church's general assembly to administer it to himself. In his book Magnificent Desolation he shares the message he then radioed to Nasa: "I would like to request a few moments of silence … and to invite each person listening in, wherever and whomever they may be, to pause for a moment and contemplate the events of the past few hours, and to give thanks in his or her own way."

He then ate and drank the elements. The surreal ceremony is described in an article by Aldrin in a 1970 copy of Guideposts magazine: "I poured the wine into the chalice our church had given me. In the one-sixth gravity of the moon the wine curled slowly and gracefully up the side of the cup. It was interesting to think that the very first liquid ever poured on the moon, and the first food eaten there, were communion elements."

He also read a section of the gospel of John. During it all, Armstrong, reportedly a deist, is said to have watched respectfully but without making any comment.

The story of the secret communion service only emerged after the mission. Aldrin had originally planned to share the event with the world over the radio. However, at the time Nasa was still reeling from a lawsuit filed by the firebrand atheist Madalyn Murray O'Hair, resulting in the ceremony never being broadcast. The founder of American Atheists and self-titled "most hated woman in America" had taken on Nasa, as well as many other public organisation. Most famously, she successfully fought mandatory school prayer and bible recitation in US public schools.

After the Apollo 8 crew had read out the Genesis creation account in orbit, O'Hair wanted a ban on Nasa astronauts practising religion on earth, in space or "around and about the moon" while on duty. She believed it violated the constitutional separation between church and state. In Magnificent Desolation, Aldrin explains how astronaut Deke Slayton, who ran the Apollo 11 flight crew operations, told him to tone down his lunar communiqué. "Go ahead and have communion, but keep your comments more general," he advised. Looking back Aldrin writes that the communion was his way of thanking God for the success of the mission. Yet, later he hinted that he could have been more inclusive:

"Perhaps, if I had it to do over again, I would not choose to celebrate communion.

Although it was a deeply meaningful experience for me, it was a Christian sacrament, and we had come to the moon in the name of all mankind – be they Christians, Jews, Muslims, animists, agnostics, or atheists."

O'Hair's case against Nasa eventually fizzled out, but it dramatically changed the tone of the Apollo 11 landing. Aldrin had originally intended a much more pioneering Christopher Columbus-style ceremony on the moon. That was never to be.

But at Webster Presbyterian church – the spiritual home of many astronauts – Aldrin's communion service is still celebrated every July, known as Lunar Communion Sunday. Pastor Helen DeLeon told me how they replay the tape of Aldrin on the moon and recite Psalm eight, which he had quoted on his return trip to Earth ("… what is man that thou art mindful of him"). The church still holds the chalice that Aldrin brought back with him. Judy Allton, a geologist and historian of Webster Presbyterian church, produced a paper, presented at a Nasa conference, arguing that communion could be an essential part of future manned space travel. She claims that rituals such as Aldrin's communion "reinforce the homelink".

And as for O'Hair? History was unkind. She disappeared in 1995 along with her son Jon and granddaughter Robin Murray. After a long hunt, their dismembered and charred bodies were found in a field. Authorities believe that David Waters, a former employee of O'Hair, masterminded a plot to rob and murder O'Hair. Her born-again son, William Murray, who lost not only his mother but also his brother and daughter to Waters and his associates, has spoken very strongly about his upbringing under O'Hair. He mourns his family but believes his mother was pumped up by her own hype and was even evil. In a statement given in 1999 he said, "she honestly believed she had singlehandedly removed prayer from school. She honestly believed she had 'liberated' America sexually". Whatever we make of Murray's criticisms, it appears O'Hair was a woman on a mission in the 60s and 70s. Having taken on the world, O'Hair believed it was perfectly plausible to take on space.

But in a sense, she need not have worried. No human has visited the moon since 1972, let alone preached from it. Meanwhile, the last message broadcast from another planet was a song by American singer and rapper Will.i.am. It was relayed by Nasa's Curiosity rover currently exploring Mars. Hardly a violation of the first amendment.