“This makes me worried,” Mr. Shiundu said.

Fearful of clashes erupting, thousands of people have already fled major cities, including Nakuru and Eldoret, in the Rift Valley region of Kenya, where some of the worst postelection violence took place a decade ago. Shortly after the 2007 election, about 50 people were burned alive as they sought refuge in a church near the city, in western Kenya. Bus tickets from Nairobi to rural cities are twice the usual price, and flights are overbooked, according to travel agencies.

“After what happened in 2007, no one wants the same,” said Vanity Kosgi, 37, a politician in Eldoret. “People learn.”

Alfred Agisu, 35, the leader of a scraggly troupe of young drummers in Eldoret, urged residents not to succumb to violence. “We make music to preach peace,” Mr. Agisu said.

In a contest that will cost at least $1 billion, according to Kenya’s treasury, more than 19.6 million registered voters will choose hundreds of legislative candidates across the country, in addition to the president and vice president.

“Quite a lot is at stake,” said Justin Willis, professor of history at Durham University in England and an expert on Kenyan politics. “Everyone is working hard to win. People have invested so much — and so much money — that they need to recoup their losses, right up to the president.”

Facing no limits on campaign financing, politicians have spared no expense. They have showered voters with money and even hired helicopters for their campaigns. The common belief is that once voted in, lawmakers, whose official salaries are 25 times higher than those of average Kenyans, will redistribute some of that wealth to their supporters.