"You can jive with secular music, but you can't jive with the Almighty," said Duke Ellington in 1973, after premiering the third of his Sacred Concerts at Westminster Abbey in London. The words "jazz" and "church" sound funny together, especially if you rely on a few hoary cliches: nocturnal blues and drug problems alongside starched surpluses and incense? Surely the devil is the one with the jazz CDs?

Perhaps not - even Lalo Schifrin, who scored Mission Impossible and Dirty Harry, has written a jazz mass in eight movements. Last week at Westminster Abbey, there was a sung Eucharist for Ascension day, with music from jazz trio Acoustic Triangle. For bass player Malcolm Creese, this gig was the icing on the cake. The band (including pianist Gwilym Simcock and reeds player Tim Garland) has an ongoing project playing in sacred places. In 2005, they managed 28 such venues, but the abbey performance was special, partly because of the spectacular building, but also because they were accompanying a service. As well as playing before the service and during the communion, the trio took alternate verses of the introit hymn with the choir. Then, for the Jubilate Deo, Garland composed a setting specially to combine the choir and trio.

This was a late afternoon service, which was a good thing. Jazz players are not at their best in the morning - something the Reverend John Garcia Gensel worked out in New York City in the 1960s. Understanding that musicians tended to be up playing clubs until the early hours of the morning, he began evening services, called "jazz vespers", which musicians could attend and participate in. Ellington (who always travelled with a rosary, a Bible and a cross) was one of them.

During the service there was plenty of reverence in the playing - for the building. Creese and Garland freely admit to not having a faith, but a desire to hear churches used. As part of their mission statement, they say: "These wonderful structures are situated in the very heart of every community in the country, and yet many are underused."

The key to Acoustic Triangle is that the music listens to the building and its acoustics; it is tailored to the reverbs and resonances. Says Garland: "The building is the fourth member of our trio."