On a day that many Kenyans thought they might never live to see, some awoke before dawn and others happily trudged miles through the rain and over muddy hills to vote in a momentous election that brings an end to President Daniel arap Moi's 24-year rule.

Despite the high stakes of the election, which could wrest Kenya's presidency from the ruling Kenya African National Union, or KANU, for the first time since independence in 1963, voting was graced with optimism and relative peace. No deaths were reported, and incidents of violence were scattered and apparently minor -- a sharp contrast to the elections of 1992 and 1997, in which hundreds of people died in clashes.

Results of the election are not expected for several days, but preelection opinion polls indicated that the majority of voters supported Mwai Kibaki, 71, a career politician who leads the opposition National Rainbow Coalition.

His chief opponent is Uhuru Kenyatta, 42, the son of Kenya's first president and Moi's personal choice to run as the KANU candidate.

Kenyans today said they were ready for a new leader, whether it was Kenyatta or Kibaki.

"Our daddy Moi is gone, and he wasn't a good daddy," said Steve Mothoki, who stood with friends at a polling place here in the capital. "Change is as good as rest, so for us, today is a very good day."

As he spoke, some of his friends struck stiff-backed poses, pretending to hold Moi's signature ivory-and-gold walking stick and imitating his gravelly voice, which many have heard every morning on Kenyan state television all their lives.

"We will miss making fun," said Mary Mothoki, 21, who has never known another president and voted for Kibaki. "We just hope we don't laugh at whoever the next man is."

Moi has ruled Kenya since the death in 1978 of Jomo Kenyatta, who led the country to independence from Britain.

Once one of Africa's most prosperous and stable countries, Kenya slid into poverty and disrepair under Moi, whose rule was underpinned largely by cronyism and patronage politics.

After years of authoritarian, one-party rule in Kenya, Moi was forced to adopt multiparty democracy in 1992, and a new constitution clamped a two-term limit on Kenya's presidents.

Despite Kenya's history of corruption, few irregularities were reported during today's vote, which drew what observers described as an extremely heavy turnout.

Most problems took the form of complaints by hundreds and possibly thousands of people who said they were turned away from polls because their names were not in the voter register, even though they had voter registration cards.

In Nairobi's largest slum, a group of men who were told their names were not on the list threw rocks at a polling station, and there were clashes between members of rival parties. Voting there was briefly suspended.

"Why are there so many missing names in the registration books?" said Stella Simiyu, a research scientist, who said she brought her two young daughters with her to a Nairobi polling place to show them "how democracy worked."

"Kenyans are very mature people," she said, "and I am trying to stay calm. But this is very frustrating."

Thousands of international observers are here to monitor the process, and votes will be counted at the country's 18,100 polling places instead of being shipped to a central location -- a move aimed at avoiding what occurred in 1997, when police tossed ballots into the street as they were taking them to be counted.

Members of the European Union observation team said they were looking into today's complaints by those not allowed to vote. They said they were not sure of the legitimacy of the allegations of rigging by KANU but would look into the issue overnight.

For the most part, though, the mood was upbeat.

At some polling places, Kenyans launched into spirited impersonations of Moi and sang the opposition's adopted anthem, "Who Can Bwogo [Scare] Me?" a pop song about overcoming corruption and oppression.

"In every way, the smoothness of this transition and the need for peace is almost more important than who wins," said John Githongo, a Kenyan political scientist and local head of Transparency International, a corruption watchdog group. "It has the potential to get very confusing here, and no one wants for Kenya to turn into another Somalia, Sudan or Congo."

Kenyans see this election as a chance to return their country to its former glory.

Kenya has East Africa's largest economy, cool and sunny California-like weather, hillsides of mango and banana trees, and plentiful wildlife such as zebras and hippos that make the country a favorite safari destination for Americans and Europeans.

That magnificence is enjoyed by few Kenyans. Under Moi, rampant corruption and mismanagement of public funds crippled Kenya to the point where half the country's 30 million people survive on a dollar a day.

More than half of Nairobi's residents live in tin-roofed slums with no running water or electricity, and garbage and human waste collect in piles that children play on because they have no parks or fields in their neighborhoods.

"I have 10 children and none of them have jobs," said Alice Wayna Hamisi, 51, who was wearing a second-hand Red Hot Chili Peppers T-shirt and an African head scarf as she waited to vote early this morning in Westlands, a heavily pro-opposition Nairobi neighborhood. "Life is very hard here. I hope someone helps us."

Voters line up to cast ballots in Othaya, north of Nairobi, in a historic presidential election.Helen Wangari, 80, is assisted by an election official in Kenya. Results of the vote are not expected for several days, but polls indicated that most Kenyans supported Mwai Kibaki, a career politician who leads the opposition, over President Daniel arap Moi's handpicked candidate.