A drama as old as democracy -- the endless conflict between social order and personal freedom -- was played out Monday night in this remote ranching town, and, true to its frontier traditions, Pinedale chose freedom by a landslide margin.

In a rousing, raucous, foot-stomping display of government by the people, the residents of Pinedale packed their high school gym and rejected Ordinance 165, the seemingly innocuous proposed misdemeanor statute that had made the little town a focus of national attention.

Ordinance 165 would have prohibited taking a gun into any of the town's three bars. For that reason, various outsiders -- including the National Rifle Association, which mounted a full-bore counterattack -- thought the turmoil here was over gun control.

But many residents said the issue at stake went much deeper than that.

They saw the gun law as governmental intrusion on the live-and-let-live ethic that many westerners consider central to their way of life.

"There's a very strong 'Do Not Bug Me' attitude here," said Larry Beck, the burly, bearded councilman who led opposition to the law. Beck moved here in 1981 in search of "unflavored air and unrestricted laws," he said. "The old frontier psyche, it's still alive in this part of Wyoming."

"A lot of people wish it were still the 1890s," countered Bill Hout, the wiry, gray-haired mayor who first proposed the law.

"They don't want to admit that we've got to take some steps to deal with the changes."

The changes facing Pinedale come from two little words that have transformed countless other mountain towns: oil and gas.

Exxon and others have found energy in the Wind River Basin here. Next year the town's population of 1,066 will swell with the arrival of drilling crews.

"It's getting so you can walk down the street and see people you don't even know," the mayor said.

"So you get some strangers in a bar and they're half-saturated and they've got on a gun on their hip and that's trouble," he explained.

Mayor Hout originally proposed Ordinance 165 at a council meeting a month ago. It passed, 4 to 1, on first reading.

Then Beck, the lone dissenter, began to spread the word to local citizens and gun groups.

The resulting hullabaloo led to its reconsideration at Monday's council meeting. About 400 of Pinedale's 700 adults showed up and it was clear that their mood was not conciliatory.

To establish his bona fides, the mayor pointed out that he owns 12 firearms and would never dream of supporting any form of gun control.

In the same spirit, Beck replied, "I think the mayor's right in saying it's reasonable to keep your gun out of a bar -- but it's unreasonable to pass a law telling you that."

Then five witnesses stood up to testify. Four of them ignored the gun control question and focused on personal freedom.

"No matter how good-intended they are, these protectionary laws just wear away at our freedom," said Kevin Weiser, a young rancher in blue denim jeans, blue denim shirt and blue denim jacket.

"The police should have all the power they need -- but not all the power they want," chimed in Courtney Davis, proprieter of the Cowboy Bar on Pinedale's main street.

Davis, whose establishment boasts a large sign saying "Hunting and fishing equipment sold here by the can, bottle and case," said he, too, would like to keep guns out of the bar. "But that should be my business," he concluded.

The only witness to deal at length with gun control was George Nyfeler, an NRA spokesman who flew in for the session. He quoted Plato, Cicero, James Madison and Bill Moyers in warning that passage of Ordinance 165 would lead inevitably to a prohibition on all guns in Pinedale.

With the testimony completed, the mayor announced that because two of the five council members were absent, final action would be delayed for a month.

This elicited a noisy torrent of anger and abuse from the audience. "Let's kill this damn thing right here and now," boomed a tall woman from the top of the bleachers.

Faced with this unmistakable expression of the public will, Hout changed his mind. The issue would be decided on the spot, he declared, by a plebiscite of all residents.

"Is there anybody else here who supports this thing?" he asked. Between six and 10 brave supporters tentatively raised their hands. "Anybody opposed?" the mayor asked. A huge roar erupted in the gym as the remaining 390 voters leaped to their feet to shout their disapproval.

"Ordinance 165 is hereby rejected," the mayor said, banging the gavel. The meeting came to a close with one more enormous outburst from the victorious crowd.

"Back East you love freedom of the press," Beck said afterwards. "That's what they call the First Amendment.

"Out here we love freedom to own our guns. That's what they call the Second Amendment, and we love it just as much."