Brubeck is best known in the secular jazz world for his startling compositions using different time signatures, such as 5/4 time in the classic "Take Five," or the mixture of 9/8 time and the more traditional 4/4 rhythm of "Blue Rondo a la Turk." Both pieces are on the "Time Out" album, the first jazz album to sell 1 million copies and still one of the best-selling.
Religious faith, however, was never far from Brubeck's creative mind.
Indeed, there have always been strong links between jazz and religion one of the main musical streams that have formed jazz has been gospel music.
Nor is Brubeck alone among jazz giants who have written sacred music. Duke Ellington, for example, was invited to give what he called a Sacred Concert at San Francisco's Grace Episcopal Cathedral in 1965, and the great jazz pianist Mary Lou Williams composed a jazz Mass, "Mass for Peace."
In a 2009 interview with the PBS television program "Religion & Ethics NewsWeekly," Brubeck said his service in World War II convinced him "something should be done musically to strengthen man's knowledge of God."
That experience gave him the idea of an oratorio based on the Ten Commandments, particularly the "Thou shalt not kill" part.
But he did not act on the idea of writing sacred music until 1965, when he wrote a short piece, "Let Not Your Heart Be Troubled," to comfort his brother, Howard, whose son had died of a brain tumor at age 16.
That piece was incorporated into 1968's "A Light in the Wilderness," his first full-scale sacred composition.
That was followed by a series of pieces including 1969's "The Gates of Justice," a choral work using words from Martin Luther King, Jr.; "Truth is Fallen," in 1971; "La Fiesta de la Posada" in 1975; and "Beloved Son," in 1978.
"When I write a piece, a sacred piece, I'm looking hard and trying to discover what I'm about, and what my parents were about and the world is about," he told "Religion & Ethics NewsWeekly."
Raised a Protestant although never baptized, Brubeck became a Roman Catholic in 1980 after completing "To Hope!" a Mass setting commissioned by the Catholic periodical, Our Sunday Visitor.
He told Commonweal, the independent lay Catholic magazine, that a priest friend told him he had omitted the Lord's Prayer from the Mass setting and said he should try and compose music for it.
Brubeck resisted interfering with the flow of his composition, but said that while on vacation one night, "I dreamt the entire Lord's Prayer with chorus and orchestra. I jumped out of bed and wrote down what I had heard as accurately as I could remember."
"Because of this event I decided I might as well join the Catholic Church because someone somewhere was pulling me toward that end."
Brubeck also used motifs, themes and passages from his sacred music in his secular compositions. In the pieces he composed as background music for an episode of the television series, "This is America, Charlie Brown," dealing with the NASA space station, Brubeck utilized a number of his religious compositions.
In one part, in which Charlie Brown and his astronaut friends look down on the floating sphere of Earth, Brubeck wrote that he chose "The Desert And The Parched Land," from the "To Hope!" Mass. "The cello's theme is a setting from Isaiah: 'The desert and the parched land will exalt; the steppe will rejoice and bloom.'
"It is a vision of our beautiful Earth that I hope we can preserve for future generations," he wrote in the liner notes for "Quiet As The Moon," the CD that brings together and expands the music of the TV episode.
"To suggest the sense of isolation felt by the young 'astronauts' drifting in space, I reached back into my earlier music for a theme," Brubeck wrote. " 'Forty Days' is, incongruously, an excerpt from my first oratorio, and the title refers to Christ's self-imposed 40 days alone in the desert."
Ultimately, for Brubeck, the heart of his sacred music is the profound biblical message to love your enemies which, he said, is the "essence of Christianity."