Long lines of Kenyans queued from far before dawn to vote Monday in the first election since the violence-racked polls five years ago, with a deadly police ambush hours before polling started marring the key ballot.
The tense elections are seen as a crucial test for Kenya, with leaders vowing to avoid a repeat of the bloody 2007-8 post-poll violence in which over 1,100 people were killed, with observers repeatedly warning of the risk of renewed conflict.
Voters standing in snaking lines several hundreds of metres (yards) long -- and several people thick -- crowded peacefully outside polling stations to partake in one of the most complex elections Kenya has ever held.
People began lining up outside polling stations from as early as 4:00 am (0100 GMT) to cast their votes, two hours ahead of the official opening of the polls, with delays reported in some areas.
In middle-class areas of Nairobi, parked cars blocked the streets around polling stations.
Tensions were high in the port city of Mombasa, where an ambush blamed on a separatist movement killed five police officers hours before the opening of polling stations, said regional police chief Aggrey Adoli.
Kenyan police chief David Kimaiyo said there had been "casualties from both sides" when an armed gang ambushed police officers in Kenya's second city.
"There was a clash between people we suspect are MRC attackers," Kimaiyo said, referring to the Mombasa Republican Council (MRC), a group seeking the secession of the coastal region popular with tourists.
Police have blamed the MRC for a string of attacks last year, and the group had threatened to boycott the polls.
Despite the attack, voters packed the streets in the city.
"We are not worried, we are voting," said architect Said Said, waiting to cast a ballot at a primary school.
In one of the most complex polls Kenya has ever held, voters will cast six ballots, voting for a new president, parliamentarians, governors, senators, councillors and special women's representatives. Some 14.3 million Kenyans are eligible to vote at the more than 30,000 polling stations across the country.
"It's a very good day, because we are looking for a change," said Denis Kaene, 34, an unemployed resident of Kibera, who started queuing at 3:45am. "It will be a very calm day, I want peaceful elections."
"We have been waiting for this moment for five years. It is time for new leaders," said 38-year old high school teacher Timothy Njogu outside the Ngara polling station in Nairobi's Starehe constituency.
Neck-and-neck rivals for the presidency, Prime Minister Raila Odinga and his deputy Uhuru Kenyatta, have publicly vowed there will be no repeat of the bloodshed that followed the disputed 2007 polls.
Crimes against humanity trials later this year at The Hague-based International Criminal Court (ICC) for Kenyatta and running mate William Ruto have raised the stakes: should they win the vote, the president and vice-president could be absent on trial for years.
After hard-fought campaigns tensions are running high.
In Nairobi's shanty town Kibera, scene of some of the worst ethnic clashes during the 2007 elections -- and where a tired looking Odinga voted surrounded by a mob by journalists -- thousands waited to cast their ballots, with the start of voting delayed for almost an hour.
"We can win these elections in the first round...At the end of the day we will definitely be declared the winner," Odinga said after voting.
Ahmed Issack Hassan, Independent Electoral and Boundaries Commission (IEBC) chairman, said he was "aware of the challenges faced in various parts of the country" and were addressing them, appealing for voters to "be patient".
More than 99,000 police have been deployed to ensure the vote is peaceful, and about 23,000 observers, including 2,600 international monitors, will be on hand, officials say.
In the western town of Kisumu - the heartland of Odinga supporters who went on the rampage in 2007-2008 after he was controversially pipped to the top job by President Mwai Kibaki -- people blew whistles and sang as they waited to vote.
"We slept here last night because we want real change and we want our candidate -- Raila," said Susan Morell, 30. "We want real change but we want peace. We will accept the result as it comes out because we are sure of winning."
The 2007-2008 violence exposed widespread disenchantment with the political class, deep tribal divisions and shattered Kenya's image as a beacon of regional stability.
More checks are in place this time to limit vote rigging, while a new constitution devolves powers and has made the poll less of a winner-take-all race.