The Mormons fled the Eastern U.S. in the 1800s to escape religious persecution, and they've done well out West. The 178-year-old church -- an infant compared to most major religions -- has grown rapidly; it has more than 13 million members worldwide, including more than 4 million in the West. Now it's powerful enough to enforce some of its doctrines on whoever lives in its Western strongholds. In Utah, for instance, anyone who wants a glass of hard liquor must join a private club, provide personal information and pay a fee.

At a glance, Rexburg seems to demonstrate what happens when a religion takes over completely. Almost all the city and county officials are Mormon Republicans. The leading industry, BYU-Idaho, has woven Mormon doctrine throughout its classes. Students must obey an honor code that's even more conservative than the main BYU campus in Provo, Utah: no beards, no mustaches below the mouth corners, no hair dyed "unnatural colors," no shorts on campus, no sandals in public places, no "gaucho-style pants above the ankle" and so on. Students live in BYU-approved apartments sporting signs like "Approved Housing for Young Ladies." Curfew is midnight, except on Fridays, when it's extended for one hour.

"Choose your friends carefully," warns a 47-page Mormon rulebook called For the Strength of Youth. "Choose friends who share your values so you can strengthen and encourage each other in living high standards." Watch out for Satan's lures in "websites, concerts, movies, music, video cassettes, DVDs, books, magazines, pictures and other media." As for sexual behavior, even "passionate kissing" is forbidden until the marriage ceremony is performed. The expectation is for Mormons to get married young -- men go on two-year missions when they're 19, and come back ready to settle down.

All the college teachers and staff must also be Mormons in good standing. If they waver, they can be fired -- even the professors have no tenure, no job security. Meanwhile, the Rexburg city government Web site offers information on the "Mormon Way of Doing Business."

What has Rexburg achieved with its sexual taboos and strict moral standards? Conventional wisdom says the town and college provide security -- a safe place to live. But as I dig into the records, I find that in the past year alone, Rexburg has experienced a fair amount of insecurity. There have been many thefts from businesses, residences and parked cars; cases of embezzlement, attempted rape, and domestic abuse; a major drug ring stretching to other states; shots fired in road rage; underage drinking in a Mormon church; attempted suicide; a faked kidnapping; and at least 10 pedestrians run down in crosswalks (two of them died). Child pornography was discovered on two men's computers, and another guy was found to have molested kids for 29 years. In one case of child abuse, a father repeatedly dropped and squeezed his infant, to the point of breaking bones. Some of the incidents seem downright bizarre, fodder for the pages of supermarket tabloids: A man caught masturbating in the city library, and an apparently mentally disturbed person climbing out onto the roof of the temple. In a nearby town, an illegal immigrant impregnated a 9-year-old girl. (She was 10 years old when she gave birth to a 6-pound baby, by caesarian section, in the Rexburg hospital.) A local cop, himself a Mormon, tells me he's seen "countless" child abuse cases, at least six kids beaten to death, and many suicides in his two decades on the job. He says Rexburg's Mormon community is in "total denial" about this kind of stuff. "Religion has nothing to do with crime," he observes. "It comes down to human behavior, human nature."

Rexburg does achieve a superficial sameness among its residents, an exclusion of those who seem different. It feels safe in that sense. People who might want good coffee to be handy, or a drink of hard liquor, or an abortion, or gay sex, or passionate kissing before marriage without shame -- and people who consider such people interesting and worthwhile -- apparently go elsewhere to live.

On a Rexburg Sunday, the streets are especially quiet; the Mormon Church requires its members to attend no less than three hours of Sunday service, plus other family and religious activities. Even the Subway, Quiznos and Cold Stone Creamery are closed. (In a true Battle of the Titans, even Wal-Mart closed on Sundays for the first six months it did business here; then it decided to stay open.) Mormon preaching and music plays on radio and TV all day. Despite the religious grip, though, there is some dissent. Elsewhere, some Mormons have openly called for an end to discrimination against gay people. And dissenters have made themselves heard in the past -- sometimes successfully. Until 1978, the church held that black skin was caused by God's curse, and in its early years, Mormons notoriously embraced polygamy and confined women strictly to child-rearing. (Even today, there are no blacks or women in the church's top leadership roles.)

Affirmation is a worldwide organization of gay and lesbian Mormons, with chapters spread from California to London and Johannesburg, South Africa. PFLAG (Parents, Families & Friends of Lesbians and Gays) is a national group with more than 200,000 members. By contacting both groups, I network into a different local scene. It includes Rexburg but centers on Idaho Falls, the effective capital of Mormon Idaho -- those dozen or so counties that lie closest to Utah and have populations that are more than 50 percent Mormon. As I drive the 27 miles from Rexburg to Idaho Falls, a Mormon on the car radio preaches: "We cannot expect God's help if we are unwilling to keep His commandments."

Between the cities, the last cuttings of hay lie baled in the fields. Cottonwoods and brush are turning autumn colors. Idaho Falls has about 53,000 residents, an old downtown on the Snake River banks and a sprawl of newer malls and neighborhoods. A federal nuclear lab and several small non-Mormon colleges draw an array of people who somewhat counterbalance Idaho Falls' Mormon temple, but still, the city is roughly 54 percent Mormon. When July 4th falls on a Sunday, Idaho Falls shifts its fireworks to July 3rd or July 5th. I find Dixie's Diner, which has an American flag flapping overhead and a kitschy 1950s-motif: red vinyl seats and chrome trim. In the banquet room in back, I meet the Gay Sunday Brunch group -- several dozen gay guys and a few lesbians who meet in the diner every Sunday.

Christopher Jones, 33, grew up Mormon in Rexburg and tells me that it was "very confusing." He's sitting beside Danny Yandell, who is 43 and speaks with an Arkansas drawl; Yandell's been around here 14 years working as a surgical nurse. Jones and Yandell have been together about a year and a half and like to go camping, hunting and fishing. They flew to California in August to get married in a Unitarian church. "I wanted a church wedding because I'm spiritual," Yandell says.