In Christian music, the line between sacred and secular can be blurred.

Could anything be less cool than Christian rock? The very term sounds like an oxymoron. Rock ’n’ roll is cacophony, rebellion, and sex. Church music is staid tunes, reverence, and abstinence. Squaresville. Christian rock is “bad songs written about God by white people,” in the words of comedian Joe Bob Briggs. The journalist John Jeremiah Sullivan called it “a musical genre, the only one I can think of, that has excellence-proofed itself.”

Randall J. Stephens might beg to differ. In The Devil’s Music: How Christians Inspired, Condemned, and Embraced Rock ’n’ Roll, he tells an engrossing story about American Christianity’s long and ambivalent relationship with what Fats Domino dubbed “the big beat.” Stephens says rock ’n’ roll prompted Christians to reconsider “how their churches and denominations could or could not relate to the larger culture and to a secular society.” Even more interesting, though, is the way rock music troubled the easy distinction between the sacred and the secular.

A single thread ties most of rock ’n’ roll’s pioneers together: From Elvis Presley and Jerry Lee Lewis to Little Richard and James Brown, many of the founding giants of rock grew up in Pentecostal churches. Pentecostal services were dramatic affairs. Worshipers shouted and danced until they fell to the floor, then sprang back up, healed of what had ailed them or speaking in tongues. Behind the hellfire preaching and general pandemonium was hot music: pianos and drums, tambourines and triangles, saxophones and trumpets, all whipping the congregation into ecstasy. Skeptical journalists and respectable Christians alike scoffed at the miracle cures and snickered at the “thinly veiled eroticism of the devotees,” but as one black Pentecostal told a curious anthropologist, “A lot of folks talk about getting too emotional. I wouldn’t give two cents for a religion that wouldn’t make me move.”

It certainly moved the young Johnny Cash. He recalled hanging on to the pew in front of him so hard that his knuckles turned white as he watched the “writhing on the floor, the moaning, the trembling, and the jerks.” It taught others how to move a crowd. At the Memphis First Assembly of God, Elvis watched a group whose “leader wuz a preacher,” he later told an interviewer, “and they cut up all over the place, jumpin’ on the piano, movin’ every which way. The audience liked ’em. I guess I learned from them singers.” James Brown borrowed much of his act from a Pentecostal barnstormer, Bishop Daddy Grace, who bounded across the stage wearing gaudy suits and a cape. Pentecostals may not have had money or social status, but “they had the beat,” recalled Brown. “Sanctified people got more fire.”

But once that fire spread beyond storefront and ramshackle churches, it seemed to leave the sacred behind. In performance, stars such as Jerry Lee Lewis and Little Richard radiated what Stephens calls a “feline masculinity,” and with song titles like “It Ain’t the Meat (It’s the Motion)” and “Big Legged Woman,” the eroticism of the Pentecostal service was decidedly unveiled.

No surprise, then, that the conservative Christian backlash was swift and fierce. Black church musicians accused artists like Elvis and Ray Charles of theft, taking what was holy and perverting it. Many white Christians thought the big beat was the work of Satan himself. Billy Graham regretted that Elvis’s music “[emphasized] the sensual,” and saw in the King’s swiveling hips another sign of iniquity, “ever working in the world for evil.” The evangelist William Ward Ayer warned readers of Youth for Christ magazine that “every low idea that can be raked out of the dives of New Orleans, the wild, unbridled sensuousness of semi-civilized Caribbean rhythms, and even in the dark and dank jungles of seething Africa, are being set to incendiary music to thrill the squealing mob and set them to moaning, groaning, twisting and twirling in empty-headed ecstasy.”

The popular opposition between rock music and Christianity was set. Every new development, from the Beatles to heavy metal, would be met with denunciations and occasional public bonfires, invariably fueled—sometimes literally—by an offending record.

For all their antagonism, “the line separating godly and worldly music had long been a thin one. Sometimes there was no line at all,” Stephens notes. Elvis and Johnny Cash cut gospel albums, and Little Richard, despite his complicated relationship with his own sexuality and his penchant for cross-dressing, dreamed of becoming an evangelist. Many commentators also noted the religious fervor of Beatlemania, in which teenage fans fainted dead away or begged hotel doormen for relics: “If the Beatles stay at your fine hotel,” wrote one supplicant, “please save me something that Paul, George, or Ringo touched. It would mean so much to me.”

Why was the line between the sacred and secular so unclear? As the Arkansas-born rock musician and filmmaker Tav Falco has pointed out, “Gospel and rock ’n’ roll were cut from the same cloth, even though one is considered to be the devil’s music, and the other sanctified music. [They were] played by the same people, and appealed to the same audience.” However different they may have seemed, they both promised an experience that would transport band and listeners to the edge of otherworldly delights—even transcendence.

The rise of the “Jesus People” and the advent of Christian rock caught secular observers and pastors by surprise in the late 1960s. Fundamentalists like Jerry Falwell were ambivalent about rock bands in churches, fearing that they had “a tendency to overemphasize the emotional,” but this fast became a minority viewpoint. In a matter of decades, Christian rock had legions of converts. By the twenty-first century, writes Stephens, “the majority of evangelical churches used popular tunes and beat-driven, rock-style music as part of their worship and praise services.” Perhaps this music is less an aberration than a return to the norm. After all, would you give more than two cents for a religion that wouldn’t make you move?

The whiff of the sacred in mainstream rock should come as no surprise. Many popular acts are Christian rock in all but name, including Sufjan Stevens and U2. Even more importantly, seemingly secular groups from The Doors to Maroon 5 have routinely invested their songs with all the overwhelming drama of religious experience. How could it be otherwise? Without the possibility that the band really was about to “break on through to the other side,” as Jim Morrison had it, all their writhing and moaning and trembling would look ridiculous, indeed just like the “empty-headed ecstasy” William Ward Ayer had warned against in the fifties.

Pastor Ayer died in 1985. Perhaps it’s fortunate that he went on to his reward when he did. If he were to flip through the FM dial today, he’d have a hard time telling the difference between Christian rock and Top 40 hits. If that sounds like overstatement, consider this: As of this writing, the most popular rock group in the nation is Imagine Dragons. Songs from their newest album hold all three spots on Billboard’s Top 40. Core members of the group grew up in The Church of Jesus Christ of Latter Day Saints, another homegrown new religious movement. The band’s latest hits both draw on the church’s strong musical tradition and irritate more orthodox believers. It’s a familiar dynamic, old as rock ’n’ roll itself.