Prime Minister Paul Martin's Liberal Party lost its absolute majority in Parliament in nationwide voting on Monday, but still outdistanced its rivals and appeared likely to hold on to power by forming the nation's first minority government in 25 years.

Preliminary results announced by Canada's electoral commission said the Liberals, who have held the government for 11 years, won 135 seats in Parliament, short of the 155 needed to retain a majority.

But the Conservative Party, led by Stephen Harper, which expected a boost at the polls because of anger over a government financial scandal, was unable to gain as many seats as it hoped.

Nearly complete returns showed the Conservatives winning 97 seats in the new Parliament, a gain of 24. The Bloc Quebecois party was projected to win 54 seats, a net gain of 21. The New Democratic Party won 22 seats, a gain of eight. The Liberals would have to form an alliance with a smaller party to form a new government.

It appeared Monday night that the Liberals would attempt to form a coalition with the New Democratic Party.

Martin, whose party lost 33 seats in the election, said in a speech Monday night in Quebec that Canadians had sent the Liberals a message: "As a party and as a government, we must do better." He said he would work to maintain a progressive Canada, strengthen health care and build a national system of child care. Martin, whose party was hobbled throughout the campaign by a financial scandal in the Liberal Party, declared in Quebec, "We will work very hard every day to earn your confidence."

Harper, who just weeks ago had projected his party would win a majority government, admitted Monday night he was disappointed in the results but congratulated the party on depriving the Liberals of a majority.

"We increased our seats and broadened our base," Harper told cheering supporters in Alberta. "Until someone achieves a majority, the fight is not won or lost."

Goldy Hyder, a Conservative Party strategist, said the party failed to win over Canadians on certain key issues such as support for the war in Iraq. "I think the challenge for the right continues to be that it finds itself on the wrong side of what turns out to be dominate election issues," he said. "On those kinds of issues, it still has a way to go to explain to the public what its views are."

As leaders of the major parties ended five weeks of campaigning, they were shown on television casting votes in their home precincts.

Martin, who was widely seen as running a botched campaign in his effort win a fourth consecutive term for the Liberals, voted in Quebec. He returned home on Monday morning after flying across the country, attempting to rally voters to remain with his party. He charged that Harper, his main rival, had a hidden agenda to stop same-sex marriage, change abortion laws and privatize Canada's free public health care system.

Harper, who advocates cutting taxes and increasing military spending, voted in Calgary, Alberta. In last-minute campaigning on Sunday in Alberta, he argued that the Liberal Party was corrupt, citing the ongoing financial scandal. He characterized Martin as "a desperate man."

"There is no culture of defeat in this room," Liberal Party candidate Scott Brison said after he won in Atlantic Canada. "Across Canada tonight in an extremely tight election, we hope Canadians vote to put Canada first and vote to support values that make Canada the envy of the world."

In the crucial province of Ontario, Liberals had captured 75 of the 106 seats, and the Conservatives won 24. In Quebec, Bloc Quebecois won 54 seats and the Liberals won 21. The Conservatives won no seats in Quebec.

Political analysts said that in Atlantic Canada, many members of the old Progressive Conservative Party voted for the Liberals instead of for the new Conservative Party. Preston Manning, the leader of the former Reform Party, said in a televised interview: "When Atlantic Canada is worried, they go with the devil they know. When the West is worried, they tend to stir up the pot."

When Martin called the election and shut down Parliament, the Liberals had 168 seats, the Conservatives 73, the NDP 14 and the Bloc Quebecois 33. There are nine independents and four vacant seats. Seven electoral precincts were added, giving the new Parliament a total of 308 seats.

No minority government in Canadian history has stayed in office more than two years. The last such government was in 1979, under Joe Clark, a Progressive Conservative. That government lasted eight months. The Progressive Conservatives later merged with the Canadian Alliance party to form the Conservative Party.

Governor General Adrienne Clarkson, Queen Elizabeth II's representative to Canada and the official head of Canada's Parliament, could decide who will form the next government. Clarkson, born in Hong Kong and the first immigrant to hold the office of governor general, has often described herself as above politics.

Public opinion polls had indicated the results were too close to call. About 22 million people are registered to vote in this country of 32 million. Voter turnout was 13.1 million, 59 percent of registered voters.

Voters interviewed after casting their ballots described the election as one of the most difficult they had participated in. Some described the choice as the lesser of evils.

Some said they cast votes against the Liberals, who they called corrupt because of the financial scandal that developed early this year. A government audit reported that between 1997 and 2001 about $75 million was paid for unknown purposes to companies with ties to Liberal Party members.

Jill Fagan, 40, who lives in Toronto, said she voted Liberal. "I have a lot of problems with the Liberal government, but as far as all the candidates go, I think Martin is the strongest leader," Fagan said. "Harper scares me."

Fagan said she was wary of Harper's support of the U.S.-led invasion of Iraq. "I call him George W. Harper," she said.

Faisal Chowdhury, 40, switched her vote this time from Liberal to NDP. "I think the time is now to change," Chowdhury said. "The NDP speaks for people like us, for the poor people, the needy people."

Adrienee Dore, 78, said she voted Liberal. She said she was bothered by the financial scandal, but believed the Liberals made a mistake. "I believe it won't be repeated again," she said.

On Sunday, callers to a Canadian Broadcasting Corp. radio show gave a wide sense of what Canadians were thinking.

Leona Savoir, of New Brunswick, said she was afraid of Conservatives. "The Liberals are not perfect," she said. "But I could never support a party that is questioning the rights of women to abortion, that is not in favor of same-sex marriage. This is very divisive."

Researcher Joe Paraskevas in Ottawa contributed to this report.

Martin was seeking to win a fourth consecutive term for the ruling Liberals. Stephen Harper's opposition Conservative Party finished second in the voting. Liberal Party supporters cheer as they watch the federal election results at Prime Minister Paul Martin's headquarters in Montreal.