Inspiration came to Ron Buford at 3 a.m. The way he remembers it, he sat bolt upright in bed with the thought that God was speaking.

What burst into the Cleveland marketing executive's head that night in January 2002, however, was not a message from the Almighty. It was a slogan for a television advertising campaign. Beginning this fall, the United Church of Christ plans to spend $30 million to promote itself using the line that came to Buford in his sleep -- "God is still speaking" -- to reflect its willingness to reinterpret the Bible and embrace such innovations as same-sex marriage and openly gay ministers.

The 1.4 million-member UCC is far from the only church seeking to publicize its positions at a time of deepening conflict and reawakening interest in American religion. In a swelling choir of self-promotion, half a dozen major Protestant denominations are either in the middle of, or are about to launch, national ad campaigns that collectively could cost $150 million over several years.

Moreover, this unprecedented boom in religious advertising is being led by mainline denominations -- such as the UCC, Methodists, Episcopalians and Presbyterians -- that used to consider TV advertising below their dignity or beyond their means. Faced with declining memberships, they are making a beeline from their tall-steeple churches to Madison Avenue.

"In the '70s or '80s or even the '90s, TV would have seemed too commercial. There would have been a big debate about whether a mainline church should be on TV," said Buford, who worked for AT&T and Blue Cross Blue Shield of Western Pennsylvania before he was hired in July 2000 as the UCC's in-house advertising expert. "Now everybody's doing it."

The Episcopal Church, for example, has faced an insurrection by conservative parishes since its ordination of a gay bishop in New Hampshire last year. But marketers see an opportunity.

"Among 20- to 30-year-olds, everybody's heard of the gay bishop. And in focus groups, the words that keep coming up are that we are a 'progressive,' 'open' and 'nonjudgmental' church," said Daniel B. England, the church's director of communication.

Thus, the Episcopalians will launch their first national TV ad campaign on Election Day with a 15-second spot that pivots off the presidential campaign to appeal for new members.

"We think this could be a very divisive election," England said. "We're saying to people, 'If you're fed up with all the divisions, you might want to take a look at us, because we're in the business of inclusion, not division.' "

At its annual convention early this month in Richmond, the Presbyterian Church (USA) unveiled a 2005-06 ad campaign. Aimed at people ages 25 to 49, it will show the church helping young adults through times of crisis and transition; one ad is an extended close-up of a woman grunting through childbirth.

A smaller Presbyterian ad campaign that began in 1997, called "Stop In and Find Out," was aimed at spiritual drifters looking for a religious home. But that was part of an early wave of warm-and-fuzzy advertising; the new wave is more pragmatic and pointed. "Back then, it was all about seekers. Today, it's all about relevance to what's going on in people's lives," said the Rev. Douglas A. Wilson, who runs the Presbyterians' national evangelism effort.

The UCC's ads are especially edgy. One shows a pair of bouncers manning a rope line outside a church, admitting a white heterosexual couple but barring gays and racial minorities. "Jesus didn't turn people away. Neither do we," the ad says.

In the process of developing the UCC ads, a large New York advertising agency, Gotham Inc., conducted focus groups in three cities and test marketing in six. Gotham also devised what it considers a "brand personality" emphasizing that the UCC -- formed by a 1957 merger of the Congregational and Christian churches with the Evangelical and Reformed Church -- is a "cutting edge" denomination that was the first to ordain a woman, in 1853, and an openly gay man, in 1972.

Not all UCC members are happy with this message. The Rev. Richard A. Weisenbach, pastor of the First Parish Congregational Church in Wakefield, Mass., said he fears the UCC "is committing suicide" by promoting itself as a church without fixed principles. "You don't grow a church by telling people you're going to do whatever they want you to do," he said.

Some evangelical Christians are also dismissive of self-promotion. They contend that mainline churches are losing members because they no longer hew to a traditional understanding of the Bible.

"I am extremely doubtful that advertising is going to have any significant impact on their membership rolls," said R. Albert Mohler Jr., president of the Southern Baptist Theological Seminary in Louisville. "Churches are not a product, they're about the Gospel. And the Gospel cannot be helpfully reduced to a 30-second message or a jingle."

That skepticism, however, has not kept evangelicals from running their own TV ads. The 16 million-member Southern Baptist Convention, which opposes gay marriage and has urged wives to "submit" to their husbands, is laying plans for an ad blitz starting in late 2005. Baptist leaders said it probably would be much larger than any of the campaigns they have run every five years since 1985.

Although the Southern Baptist Convention has not decided on the content for its ads, "we will stand on what we understand the Scripture to teach," said Martin King, spokesman for the Baptists' North American Mission Board. "We're proud of the fact that we're not going to shy away or try to make it an easy message."

From the 1970s until the late 1990s, religious ads on television consisted mainly of public service announcements produced by the Roman Catholic Church and the Church of Jesus Christ of Latter-day Saints, or the Mormons. Because they were aired for free, such announcements tended to be generic messages to love your neighbor and keep tabs on your children, though they also subtly polished the sponsor's image.

Under the tutelage of professional marketers such as the UCC's Buford, churches are turning to paid advertising to deliver more overtly self-interested messages: to give a denomination a distinct brand, to drive up attendance and contributions, and to raise the pride of current members. Attracting new members may appear to be the main goal. Often it is not.

"The main thing ads do is make your own members feel good -- and that ain't a bad thing," said the Rev. Eric C. Shafer, director of communications for the Evangelical Lutheran Church in America, which began a $7 million campaign in 1999.

Said David Strand, director of public affairs for the more conservative Lutheran Church-Missouri Synod: "It's like Buick ads trying to make sure Buick owners stay loyal to the brand. That sounds kind of crass, but that's how it works."

Several trends have combined to produce the advertising boom. One is the membership decline in mainline denominations, which they are anxious to halt. The UCC has lost 150,000 members in the past decade. The Episcopal Church has lost nearly 200,000. And the Presbyterian Church (USA) has fallen from 4.2 million members in 1983 to 2.4 million.

Another factor is the proliferation of cable channels, which has driven down the minimum cost of a TV commercial. While prime time, nationwide airtime is still expensive, some congregations are able to buy late-night spots on local cable outlets for as little as $5.

Meanwhile, "it's harder and harder to get public service time," said Pat Ryan Garcia, director of distribution for the Catholic Communication Campaign, which still produces several public service announcements each year. "Since broadcast deregulation kicked in in the mid-1980s, the networks don't have to run PSAs, and our communications directors in the dioceses tell us if they want a guaranteed time, they have to buy the spot."

Even the Mormons, admired by other denominations for their family-oriented public service announcements, have been buying airtime since 1987. They do not disclose their advertising budget, but they spent $3.4 million on cable television in 2003, according to TNS Media Intelligence, a firm that tracks ad expenditures.

When Mel Gibson's "The Passion of the Christ" is a box-office sensation and the "Left Behind" novels about the Second Coming have been outselling all other fiction, some mainline Protestants believe they cannot afford to ignore popular culture. "When members of your church see other denominations on TV or hear their spots on the radio, they will just naturally ask, 'When are we going to do something like that?' " said Presbyterian Church spokeswoman Ann Gillies. "In this day and age, you have to have something in the media to tell your story."

Perhaps the most important cause of the boom, church officials said, is the success of an ad campaign launched in 2000 by the United Methodist Church. Its slogan -- "Open Hearts. Open Minds. Open Doors." -- portrays Methodists as warm and welcoming. And, according to research commissioned by the church, first-time attendance has risen 14 percent and overall worship attendance is up 6 percent at a nationwide sample of 149 Methodist churches since the ads began appearing.

At the Methodists' quadrennial convention in May, some internal critics called the "Open Minds" slogan hypocritical because of the church's ban on gay clergy. But Methodist leaders said the campaign's results surpassed expectations, and the convention overwhelmingly approved $25 million to keep it going for another four years, on top of the $18 million that was spent from 2000 to 2004.

Other denominations have taken notice. "I've always called advertising fertilizer -- it only can fertilize a larger effort to evangelize," the Lutherans' Shafer said. "Now I think it's Miracle-Gro."