WARSAW, Poland (AP) _ Millions of enthusiastic Poles voted Sunday to elect legislators in Eastern Europe's freest balloting in more than 40 years. Early unofficial results indicated a strong performance by Solidarity candidates.

The elections for a new Senate and Sejm, the existing one-chamber parliament, were the first in Poland involving opposition candidates since 1947, when the vote was widely denounced as fraudulent and the communists secured their hold on power.

More than 62 percent of the nation's 27 million eligible voters cast ballots, the official news agency PAP reported early Monday, quoting the State Electoral Commission. Earlier, a commission spokesman had told The Associated Press that 73 percent voted, and there was no immediate explanation for the discrepancy.

Officials originally projected an 80 percent turnout but participation lagged in several rural areas, said Communist Party spokesman Jan Bisztyga.

Polls opened at 6 a.m. and closed at 10 p.m. Official results are not expected until Wednesday but counting of the paper ballots began after the polls closed and was expected to continue through the night at some stations.

At one polling station - a hospital ward with 92 valid votes near Krakow - the Solidarity-backed candidate for one Senate seat won 91 votes and its candidate for the second Senate seat received 89, according to the Solidarity Citizens Committee in Krakow.

A campaign director in Warsaw for Solidarity, the country's independent trade union federation, claimed opposition candidates were getting about 80 percent of the vote.

Opposition to the Communist Party and its allies was led by Solidarity, which signed up 100,000 poll watchers to ensure honest elections.

''People are not acting like sheep and just dropping in their ballots,'' Malgorzata Ufnal said as she voted in Warsaw. ''They sit down and think about the candidates.''

Each voter was required to cross out dozens of names on up to seven paper ballots and final official results may not be known until Thursday, according to election officials.

Two minor protests of the elections were reported, but officials said they did not threaten the balloting.

Solidarity leader Lech Walesa and Communist Party leader Gen. Wojciech Jaruzelski were among the first to vote.

Walesa was cheered by 50 people who crowded polling station No. 169 in the port city of Gdansk as he voted for only the second time in his life after years of boycotting.

''Poland has started on the road of progress, and you have to help her,'' he said.

Voters chose all 100 people for the new Senate, the only freely elected legislative chamber in the East bloc. It will have veto power over legislation passed by the 460-seat Sejm.

Opposition candidates were permitted to run for 161, or 35 percent, of the Sejm seats, under an agreement reached in April between the government and opposition.

The agreement also legalized Solidarity, which was banned after a martial law crackdown in December 1981.

On Sunday, the mood was jubilant at Solidarity headquarters.

''We have been working very hard and I am very happy that it is going as it is,'' said Anna Dub, the Warsaw campaign director. According to information from several polling stations in Warsaw ''at least 80 percent'' of people said they were voting for Solidarity, she said.

Among 247 voters questioned by Western journalists in Warsaw, Gdansk and several smaller towns, 180 said they voted for Solidarity. Eight said they voted for Communist Party candidates and the rest said they voted for a mix of candidates, or refused to answer.

The government appeared nervous that some of its best-known figures, running unopposed for the Sejm on the so-called ''national list,'' might nonetheless receive less than 50 percent of the vote.

Without half the vote, national list candidates would be defeated and the Sejm seats would not be filled. A runoff is set for June 18 for all other races in which no candidate receives 50 percent of the vote.

Walesa said he would be satisfied if Solidarity won 25 percent of the Sejm seats and 75 percent of the Senate.

Many voters treated the election as a referendum on the party's 45 years of rule. Both sides agree that political changes will not quickly or dramatically improve the economy, burdened by a $39 billion foreign debt, shortages, inefficiency and 80 percent annual inflation.

The historic day broke damp and gray but turned sunny in the afternoon. Large crowds appeared at polling stations after people in the heavily Roman Catholic country emerged from Mass.

There were more than 22,400 polling stations nationwide. Solidarity members set up tables outside many stations and gave out names of the movement's candidates, information on how to vote and even lollipops in Solidarity wrappers.

Many people said they voted after years of boycotting elections because the only candidates were those approved by the Communist Party.

Walesa urged all those eligible to vote, calling the election ''a chance now to make this the country of our dreams.''