Texas Gov. George W. Bush survived the first test of his presidential candidacy here tonight, winning the Iowa straw poll, but only after fending off a challenge from Steve Forbes and Elizabeth Dole.

In the largest turnout ever at this quadrennial event, Bush won 31 percent to Forbes's 21 percent. Dole finished third with 14 percent, and Gary Bauer, the former head of the Family Research Council, was the leader among the conservative candidates, finishing fourth with 9 percent.

Conservative commentator Patrick J. Buchanan was close behind with 7 percent, followed by former Tennessee governor Lamar Alexander with 6 percent, former ambassador Alan Keyes with 5 percent, former vice president Dan Quayle with 4 percent and Utah Sen. Orrin G. Hatch with 2 percent.

Bush's victory demonstrated his ability to convert some of his poll support into actual votes against a big field of opponents. But the fact that seven in 10 Iowa Republicans chose another candidate made it less than a ringing endorsement. Campaign strategist Karl Rove said that "in 63 days, with no TV, no radio, we put together a field organization that gives us a real head start on next winter's caucuses."

Forbes, a magazine publisher, tried to use the straw vote to move the nomination battle toward a one-on-one contest with Bush and maintained that the results show he is the conservative alternative to Bush. He contended that Bush's performance was poor, saying that the outcome was a rejection of the "establishment" candidate.

But Dole campaign officials said they were "ecstatic," given their investment compared with the free-spending campaigns of Bush and Forbes. Dole spokesman Ari Fleischer said that "on a per-dollar basis, we cleaned their clock."

Bauer said he was pleased to be in what he called "the first rung of candidates" in the race and said he anticipated that some of those in the bottom of the pile might have trouble surviving much longer.

Buchanan showed enough strength to encourage him to stay in the race, although he has been flirting with appeals to leave the GOP and seek the Reform Party nomination.

The disappointing finishes for Quayle and Alexander left their ability to remain as active candidates in question.

Bush spent less time campaigning in Iowa than any of the others who competed here today. But he relied, as in Texas, on a well-financed organization to identify and turn out his supporters.

Bush was far from the most electric speaker of the day, delivering a version of his standard stump speech and emphasizing his leadership abilities. "I've learned that you cannot lead by dividing people or pitting them against one another," he said. "I'm a uniter, not a divider."

The only active Republican candidate who did not compete in the straw poll was Arizona Sen. John McCain. Two former candidates New Hampshire Sen. Robert C. Smith and Ohio Rep. John R. Kasich, were included on the ballot.

In a potentially ominous warning, Buchanan hinted that if he finds no support within the Republican Party for his message of economic nationalism and social conservatism, he might consider running as a third-party candidate, a move that could badly damage the party's eventual nominee.

The results were announced after the nine competing candidates delivered a sharp attack on the policies and morals of President Clinton and on the man many believe will be the Democratic nominee, Vice President Gore.

Speaking of the scandals that have plagued the administration, Hatch said of Clinton, Gore and first lady Hillary Rodham Clinton: "I think they're about to find out that America can live without them, that it's time for the three of them to just go home. And maybe they will, if any of them can figure out just where home is."

But many of the GOP candidates also aimed their fire at the Texas governor, warning the audience of Iowa activists not to let party leaders and the news media pick their nominee before the voters could speak.

"The Washington establishment wants to control this election," Quayle said. "They say money will control our nominee, that issues don't matter. Let's send them a message."

Keyes implied that if Bush or Forbes were to win the nomination, Republicans can prove again that money is God and God is money."

Alexander, noting that Republicans will be nominating the first of a new generation of leaders, said the party should not give the prize to anyone not fully prepared to be president. "We need a contest, and we better not send an untested person into the debate with Al Gore," he said, adding, that the question is, "Who is prepared? Nominations shouldn't be bought and shouldn't be inherited."

Buchanan delivered a typical stemwinder that had the crowd cheering repeatedly, but closed with what he said were words aimed directly at his own supporters. Quoting Abraham Lincoln, Buchanan said, "I see the storm coming. . . . If there's a place and a part for me, I believe I'm ready."

The comment came amid increasing speculation, which Buchanan has refused to stop, that he may leave the Republican Party to seek the Reform Party's nomination. Karen Hughes, Bush's press secretary, said on CNN tonight, that Bush had spoken to Buchanan here in Ames and urged him to stay in the party.

Today's nonbinding straw poll has no formal role in the GOP nomination process, but the candidates invested time and money as if the contest were a surrogate for the precinct caucuses that will be held early next year -- the formal kickoff event of the 2000 campaign.

The contest, which was open to any Iowan who will be 18 by November 2000, drew an overflow crowd roughly double the size of 1995. At one point the doors to the Hilton Coliseum were closed by fire marshals because the building was filled to capacity. Those still waiting to vote were encouraged to go to adjacent buildings, where the Iowa Republican Party has set up additional polling places.

Forbes spent close to $2 million on the event, and Bush's campaign said he would spend about $750,000. The nine GOP candidates mingled with their supporters at circus tents, offering free food and entertainment and all the candidates paid for the $25 tickets required of anyone who wanted to vote.

Forbes's army arrived at the coliseum grounds early in the day, a show of force that caught the other campaigns, including Bush's off guard. Lines of Forbes voters in bright orange shirts snaked for the equivalent of more than a city block waiting to be fed, and the Forbes organizers encouraged them to vote early to avoid waiting.

Bush, in contrast, brought his supporters to the site later in the afternoon, and many of his 100-plus buses got caught in the huge traffic jam on the roads around Ames. "We've still got 55 buses that haven't arrived," a Bush campaign staffer said at one point. But they exuded confidence throughout the day, noting that at some of their bus stops around the state, more people showed up than they had expected.

Forbes's campaign officials said they had bought about 7,711 tickets for their supporters and distributed about 7,500 to supporters. Bush's campaign, the Forbes team said, bought more than 10,000 tickets. Bush not only served his supporters lunch but provided dinner for those who stayed late into the evening.

Iowa Republican Party leaders estimated early in the week that they would gross about $500,000 from the event, but the long lines and heavy voting suggested they would do far better than that.

Today's event marked the first time that nearly the entire GOP field shared a stage, and the candidates used their 10-minute speeches to lay out conservative themes while attacking the president.

As is often the case when party activists make up the audience, the more uncompromising the rhetoric, the better the response. Buchanan drew the biggest ovation of the day with his version of the popular theme that Clinton had disgraced the White House by his conduct.

The former TV commentator said that if he gets to take the oath as the nation's "chief law enforcement officer," he would turn to Clinton on the inaugural stand and say, "Sir, you have the right to remain silent. . . ." implying he would arrest Clinton on the spot.

Keyes said: "We are coming to end of most disgraceful, most immoral presidency in history of this country. He has betrayed our most sacred moral precepts."

By contrast, Bush, Dole and Forbes kept their speeches fairly positive, emphasizing conservative themes. Dole and Forbes outlined specific proposals to cut taxes, return control of schools to parents and local districts and step up the drug war.

Forbes came to the stage with a fireworks display and a big balloon drop. But the first few minutes of his speech were drowned out by people in the audience popping the balloons, which apparently dropped prematurely.

The wealthy magazine publisher, who is self-financing his campaign, attacked Washington insiders and attempted to cast himself as a populist outsider who would shake up the capital. "The power of those elites will be broken by a candidate who relies on pollsters and consultants to tell him what to think," he said. "Only an outsider can break their grip on our national life. I will not be beholden to those elites."

Dole, who earlier had her largely female corps of supporters to "make history today," never alluded to her status as the only woman in the race. Instead she portrayed herself as a tough executive who would use the bully pulpit of the presidency to build a missile defense system and "force Mexican officials to shut down pipeline of illegal drugs into this country."

Bush's address was almost identical to the stump speech he unveiled on his first trip to Iowa two months ago. He spoke in broad terms about the goals of a Bush presidency, but his rhetoric appeared to move only his most ardent supporter in the hall.

He drew cheers from everyone when he said that if he is elected president, "I will not only swear to uphold the laws of our country, I will swear to uphold the honor and dignity of the office to which I am elected."

The 1996 Republican nominee Robert J. Dole, who appeared here in behalf of his wife, had a somewhat less-inflated view of the event than many of the candidates. Introducing her this afternoon, he said, "Only one-tenth of 1 percent of the Iowa Republicans are voting here. I don't think it will determine the outcome."

Staff writer Thomas B. Edsall contributed to this report.