WARSAW, NOV. 25 -- Solidarity union leader Lech Walesa finished well ahead of five rivals today in Poland's first popular presidential election but faces a run-off vote in two weeks -- apparently against an obscure emigre businessman whose strong showing prompted expressions of astonishment from political analysts here.

Exit-poll projections showed Walesa winning nearly 40 percent of the vote -- a simple majority was needed for outright victory -- while second place appears to have gone to Stanislaw Tyminski, a self-proclaimed millionaire who before the month-long election campaign was a political nonentity here.

"This means Polish democracy is really in its beginnings," said Bronislaw Geremek, a prominent Solidarity parliamentarian who backed Prime Minister Tadeusz Mazowiecki in the race. Walesa said last week that it would be "humiliating" to compete in a two-man race against Tyminski, whom he called "a man from the bush." Walesa's spokesman said tonight that Walesa will run in the second round.

The projections showed Tyminski finishing with 23.2 percent of the vote -- more than 3 percentage points ahead of Mazowiecki, who had been considered Walesa's main opponent and who had been shown in opinion polls prior to the campaign to be the most highly respected politician in the country.

Speaking on Polish television, Mazowiecki appeared stunned by the results but did not concede that he had lost out to Tyminski. "I think that these first results illustrate a certain crisis of Polish society . . . which are the result of attacks during recent weeks against the government," Mazowiecki said. "I do not intend to take offense from the Polish nation, and I do believe in its maturity, if not at present, then in the future."

The exit-poll projections -- formulated by a German firm that has correctly forecast the result of several other recent East European elections -- showed three other candidates, including one from the former Communist party, sharing about 15 percent of the vote. Final official returns are not expected before Monday night or Tuesday.

Mazowiecki, who was handpicked by Walesa to run the Solidarity-led government that last year ended four decades of Communist rule here, ran a notably lackluster campaign. The 63-year-old lawyer and journalist looked uncomfortable and tired on the stump; his appearances were often badly organized and poorly attended. In the words of one Polish journalist, he looked like a man in a headache commercial. Walesa, meanwhile, crisscrossed the country by motorcade and helicopter, electrifying huge crowds with passionate speeches that mixed nationalism, exhortation and self-deprecating humor.

Tyminski, 42, a Polish-born businessman who claims to be worth $5 million, climbed into the race by barnstorming the country and captivating voters with his rags-to-riches life story. He presented accounts of business successes in Canada and Peru as living proof that capitalism can work for the average Pole.

In one exit-poll question today, voters were asked who among the candidates is the most reliable "if you would deposit your money for future investment." Tyminski was picked by 56 percent of those surveyed.

Tyminski promised voters a "democracy of money," while claiming that both Walesa and Mazowiecki would sell Poland out to foreign investors. Last week he accused Mazowiecki of "treason" for allegedly agreeing to sell state-owned factories to foreigners at fire-sale prices. The accusation, which appeared to be based on a misreading of government documents, was angrily denied, and the government began slander proceedings against Tyminski.

Tyminski's campaign oratory appeared to tap into a deep well of frustration in the electorate, and exit polls showed him scoring well among industrial workers, cutting deep into Walesa's main political base.

Walesa, for his part, did surprisingly well in what had been thought to be Mazowiecki's political base -- educated city dwellers. Exit polls showed Walesa winning in Warsaw and Krakow and taking 34 percent of the white-collar vote nationwide, only two percentage points below the prime minister's projected figure.

The election was forced by six months of unrelenting political pressure from Walesa, and the fact that parliament felt compelled to call a presidential vote is testament to the unique populist power that Walesa, as the working-class hero of Poland's struggle against communism, continues to wield in this country.

Last spring, from his home in the Baltic port of Gdansk, Walesa became impatient with the Solidarity-led government that he, more than any single Pole, had created only a half-year earlier. He grumbled about "a policy of slow changes" in Warsaw that was producing massive unemployment while demanding further sacrifice from Polish workers. He argued that Mazowiecki, whom he had handpicked as prime minister, was proving too reluctant to sack former Communists from the government.

To head off what he warned would be a "social explosion," Walesa vowed that he would wage "a war at the top" against Communist holdovers in government. He said Poland again needed him, a man "from the masses" willing to "swing an ax" and accelerate change. He derided Warsaw-based intellectuals and technocrats in the Solidarity movement as "eggheads" and suggested that they were forming a new ruling clique to replace the Communists.

When Walesa begun fulminating in Gdansk, Mazowiecki and other leaders in Warsaw did not hide their annoyance. The government spokeswoman dismissed Walesa as "an accelerator with an ax," and Solidarity government leaders said the last thing Poland needed was a Communist witch hunt. Some dismissed Walesa as too uneducated, emotional and demagogic to lead a country that was winning praise from the World Bank and Western governments for its intelligent and courageous economic reforms.

Most seriously, Solidarity leaders complained that Walesa was sabotaging political support for the government at a vulnerable time when the pain of post-Communist adjustment -- unemployment and declining incomes -- was making workers restive.

While Mazowiecki tried to make clear to workers that unemployment and loss of earning power were the unavoidable consequences of economic reform, Walesa promised workers it would be his responsibility to find jobs for them, and he accused the government of building capitalism on the backs of the workers.

These promises worried Western governments, including the United States and Germany. The German government hurriedly signed a long-delayed border treaty with Poland this month in an apparent attempt to bolster Mazowiecki's prospects. Last week, President Bush sent a letter to the government promising debt relief if Mazowiecki's reform policies were continued.

By this summer, the rift between Walesa and Mazowiecki had caused a wrenching split in Solidarity itself. The movement's longtime alliance between workers and intellectuals broke down, with better-educated Poles supporting Mazowiecki, and farmers and less-educated workers supporting Walesa.

In the closing weeks of the campaign, exchanges between the two major candidates became personal. Walesa accused Mazowiecki of being "feeble." Mazowiecki, who at first shied from personal attacks, said democratic Poland "cannot listen to demagogues and dogmatists who have magic solutions to heal our economy."