Poland, seeking a leader who will hold the country together as it pursues democracy and a market economy, picks its first popularly elected president Sunday in a contest that has split Solidarity.

The last pre-election poll showed Solidarity Chairman Lech Walesa comfortably leading the field of six, with his former ally Prime Minister Tadeusz Mazowiecki the closest challenger.But it appeared there will be a runoff vote on Dec. 9 because no candidate had more than 50 percent of the vote, according to the state television poll taken Monday and Tuesday.

The campaign officially ended at noon Friday by order of the National Election Commission. Officials were told to be on the lookout for illegal electioneering Saturday, including hanging posters or distributing leaflets.

Poles living abroad began casting ballots Saturday - one day early - so as not to delay the final count. Voting was taking place in the United States, Canada, Argentina, Brazil, Uruguay and Venezuela and aboard Polish ships in the Pacific.

The balloting in Poland was to begin at 6 a.m. Sunday and end at 8 p.m. About two-thirds of the nation's more than 27 million voters were expected to cast ballots. First partial results were expected late Sunday.

The television poll, with an error margin of plus or minus 3 percent, gave Walesa 38 percent of the votes, Mazowiecki 23 percent and Stanislaw Tyminski 17 percent; 13 percent went to three minor candidates, and 9 percent were undecided.

Tyminski's support appeared to be slipping, however. The emigre businessman returned after 21 years in Peru and Canada to mount a free-spending campaign based on his claimed economic expertise.

He shocked Mazowiecki's supporters by out-polling the prime minister in one survey. But since then, Tyminski has faced a barrage of criticism in the press. One commentator said Poland would be a "laughing stock" if it elected him.

"If he wins, I will emigrate," Walesa declared on Thursday.

The other candidates are Roman Bartoszcze of the Polish Peasants Party; former communist Wlodzimierz Cimoszewicz, endorsed by the Social Democracy Party; and Leszek Moczulski, head of the patriotic-nationalist Confederation for an Independent Poland.

President Wojciech Jaruzelski, the communist general who ordered martial law to crush Solidarity and imprisoned Walesa and Mazowiecki in December 1981, is expected to hand over the office to the winner before Christmas.

Walesa proposed Mazowiecki as Eastern Europe's first non-Communist prime minister in August 1989, but he and his close adviser of nearly a decade fell out in a bitter dispute this year that split Solidarity.

Walesa planned to spend Sunday at home in Gdansk after voting in the morning and attending Mass. He was to watch returns on television at his headquarters in the evening.

Mazowiecki had similar plans. Tyminski would not say what his plans were.

The first task of the new president will be to nominate a prime minister, because Mazowiecki will have to give up the office if he wins and has said he will resign if he loses.