Media playback is unsupported on your device Media caption The BBC's Gabriel Gatehouse visited a polling station as people queued to vote 
 
 Long queues are reported nationwide as Kenyans vote in an election that observers describe as the most important in the country's history. 
 
 Polls were due to close at 17:00 (14:00 GMT) but officials said those in queues at that time would be allowed to vote. 
 
 There has been violence around the port town of Mombasa, with at least five police officers killed in one attack. 
 
 Early provisional results suggested the two main presidential candidates were far ahead of the rest of the field. 
 
 Partial preliminary results from areas where polling ended on time gave Uhuru Kenyatta a lead over Prime Minister Raila Odinga, although analysts cautioned that these results came from Kenyatta strongholds. 
 
 The two front-runners were well ahead of the other presidential candidates, 
 
 Mr Kenyatta is due to face trial at the International Criminal Court (ICC) next month in connection with the widespread bloodshed that followed the disputed 2007 election - he denies organising attacks. 
 
 Mr Odinga says he was cheated of victory last time. 
 
 Biometric kits fail 
 
 Authorities had urged Kenyans to avoid a repeat of the 2007 ethnic and political violence that killed more than 1,000 people amid claims the poll had been rigged. 
 
 As thousands continued to queue to cast their ballots, voting was extended by up to seven hours to cope with long queues at polling stations. 
 
 Kenya's Independent Electoral and Boundaries Commission (IEBC) issued a notice via social media saying: "We wish to inform members of the public that all Voters on the queue by 5:00pm will be allowed to vote. 
 
 At the scene At a polling station close to the church where more than 40 people who had sought shelter there on 1 January 2008 were burnt alive most voters were happy to have cast their ballots in peace. "This vote is a new beginning," said a man who lost relatives in the fire. 
 
 The queues in some places stretched for more than a kilometre, as voters in Kibera slum stood patiently in line. As the sun grew hotter and the umbrellas came out, the mood was upbeat. "Peace, peace," one crowd shouted as a truck of paramilitary police trundled past. Kenya: Vote around the country 
 
 "Polling Stations that opened late will also close late to compensate for lost time." 
 
 The electoral commission said some delays were caused by a new system intended to reduce fraud, which observers hope will prevent the kind of widespread ethnic violence that followed the last poll in 2007. 
 
 After he cast his ballot, Mr Odinga said he would accept defeat - but added that he was confident of victory in the first round. 
 
 "I will congratulate the winner," he said. 
 
 Mr Kenyatta also sounded a conciliatory note, saying the president would represent the whole country and that any disputes should be taken to court. 
 
 Reports from around the country suggested long queues of voters had formed even before polling stations opened - and some voters, such as those in Eldoret, were waiting up to 10 hours to cast their ballots. 
 
 Some technical difficulties were reported with newly instituted biometric voting kits - designed to counter claims of vote-rigging and long delays in announcing poll results that were partly blamed for the violence in 2007. 
 
 In places, electoral officials are having to use the manual voter registers, delaying voting. But Lilian Mahiri-Zaja, vice-chair of Kenya's independent electoral commission, said the registers were complete and there was no reason why the election should not be credible. 
 
 Media playback is unsupported on your device Media caption These people were queuing outside St Mary's polling station in Nairobi 
 
 Five police officers and at least six other people - including several attackers - died in the assault in the early hours in Changamwe, half an hour's drive inland from the centre of Mombasa. 
 
 There have been further disturbances in the town of Kilifi, north of Mombasa, where six civilians were killed, but details of the incident remain sketchy. 
 
 Police pointed the finger at Kenya's coastal separatist group, the Mombasa Republican Council (MRC), but it denied responsibility, saying the group only sought change through peaceful means. 
 
 In other developments: 
 
 The BBC's Bashkas Jugsodaay in Garissa says there were three explosions in three different polling stations in Mandera, a town near the border with Somalia, as officials were preparing for polls to open. One person died, reports said 
 
 As well as the two deadly attacks near Mombasa, a third attack was reported in a village near Mishomoroni, but there was no information about casualties 
 
 In Kiharu, Muranga county, a 72-year-old woman fainted and died while waiting to cast her vote 
 
 It was unclear whether the deaths around Mombasa were election-related, but the Kenyan police chief said one of the attacks involved over 200 gang members, and in response he was sending an additional 400 officers to the area. 
 
 Some blamed a separatist group, the Mombasa Revolutionary Council (MRC) - which has called for an election boycott - for the incident in Changamwe, but others suggested it was just a convenient scapegoat. 
 
 Two-horse race 
 
 Waiting in line outside polling stations in Nairobi hours before polls opened, the atmosphere was calm and people chanted "peace", reports the BBC's Gabriel Gatehouse. 
 
 Raila Odinga vs Uhuru Kenyatta Uhuru Kenyatta Son of Kenya's first president, Jomo Kenyatta 
 
 Due to stand trial at ICC in April accused of organising violence in last election 
 
 His running mate, William Ruto, also accused 
 
 Both deny the charges 
 
 From Kikuyu ethnic group - Kenya's largest at 22% of population and powerful economically 
 
 Kikuyus and Ruto's Kalenjin community saw fierce clashes after 2007 poll 
 
 Currently deputy prime minister Raila Odinga Raila Odinga son of first Vice-President Jaramogi Oginga Odinga 
 
 Distant relative of Barack Obama 
 
 Believes he was cheated of victory in last election 
 
 From Luo community in western Kenya - 11% of population. 
 
 Some Luos feel they have been marginalised by central government 
 
 Third time running for president 
 
 Currently prime minister under power-sharing deal to end violence last time Profile: Uhuru Kenyatta Profile: Raila Odinga 
 
 In Garissa, frustration grew in the long queues as the heat beat down, our correspondent reports. Some used umbrellas to shelter from the sun and others bought water to pour over their heads. 
 
 Kenyans are choosing a president, members of parliament and senators, county governors and members of 47 county assemblies. 
 
 However, our correspondent in the capital says all eyes are on the presidency. 
 
 Eight candidates are standing but it is essentially a two-horse race pitting Mr Odinga against Mr Kenyatta, he says. 
 
 Some observers say they are particularly concerned about violence erupting should neither of the two frontrunners poll more than 50% - in which case the vote will go to a run-off, probably on 11 April. 
 
 Mr Kenyatta, son of Kenya's founding father Jomo Kenyatta, is due to stand trial at the ICC in April for his alleged role in orchestrating the violence five years ago. 
 
 Mr Kenyatta's running mate, William Ruto, has also been indicted. Both men deny any wrongdoing. 
 
 The 2007 violence broke out after Mr Odinga claimed he had been cheated of victory by supporters of President Mwai Kibaki. 
 
 Supporters of the rival candidates, from different ethnic groups, took up arms against each other. Mr Odinga later joined a government of national unity under a peace deal. 
 
 The underlying sources of tension in the 2007-8 election remain, and in some parts have escalated, with the risk of violence "perilously high", warns Human Rights Watch. 
 
 It says the "near total impunity" of the perpetrators of violence has left them free to rape and kill again. 
 
 Some 99,000 police officers have been deployed around the country. 
 
 Presidential candidates must secure support from across the country to be declared the winner, so they cannot just rely on support from their ethnic groups, as has been the case in previous elections. 
 
 Official results will be announced by 11 March by the electoral commission. ||||| A pre-dawn attack on police in Kenya early Monday killed several officers hours before Kenyans began casting votes in a nationwide election being held five years after more than 1,000 people died in election-related violence. 
 
 Masaai line up to vote in a general election in Kumpa, Kenya, Monday, March 4, 2013. Five years after more than 1,000 people were killed in election-related violence, Kenyans went to the polls on Monday... (Associated Press) 
 
 Hundreds of Kenyans lineup as early as 4 a.m. to cast their ballots in a general election in Nairobi, Kenya , Monday, March 4, 2013. Five years after more than 1,000 people were killed in election-related... (Associated Press) 
 
 Sarah James Kanaja, left, waits in line with her daughter Silvia, 3, as Kenyans line up to cast their vote in a general election at the Mutomo primary school near Gatundu, north of Nairobi, in Kenya early... (Associated Press) 
 
 Kenyans line up to cast their vote in the early morning at the Mutomo primary school near Gatundu, north of Nairobi, in Kenya Monday, March 4, 2013. Five years after more than 1,000 people were killed... (Associated Press) 
 
 Kenyans lineup as early as 4 a.m. to cast their ballots in a general election in Nairobi, Kenya, Monday, March 4, 2013. Five years after more than 1,000 people were killed in election-related violence,... (Associated Press) 
 
 Masaai women line up at dawn to vote in a general election in Kumpa, Kenya, Monday, March 4, 2013. Five years after more than 1,000 people were killed in election-related violence, Kenyans went to the... (Associated Press) 
 
 Police in the coastal city of Mombasa reported a 2 a.m. attack by a gang of dozens; early reports indicated several officers _ perhaps four or five _ and several attackers were killed. Police didn't immediately confirm a death toll. 
 
 The country's leaders have been working for months to reduce election-related tensions, but multiple factors make more vote violence likely. The police said late Sunday that criminals were planning to dress in police uniforms and disrupt voting in some locations. 
 
 In addition, intelligence on the Somali-Kenya border indicated Somali militants planned to launch attacks; a secessionist group on the coast threatened _ and perhaps already carried out _ attacks; the tribes of the top two presidential candidates have a long history of tense relations; and 47 new governor races are being held, increasing the chances of electoral problems at the local level. 
 
 Perhaps most importantly, Uhuru Kenyatta, one of two top candidates for president, faces charges at the International Criminal Court for orchestrating the 2007-08 postelection violence. If he wins, the U.S. and Europe could scale back relations with Kenya, and Kenyatta may have to spend a significant portion of his presidency at The Hague. Kenyatta's running mate, William Ruto, also faces charges at the ICC. 
 
 Long lines began forming early across the nation. In Kibera, Nairobi's largest slum, some 1,000 people stood in several lines at one polling station before daybreak. Voter Arthur Shakwira said he began standing in line at 4 a.m. but left the queue over confusion about which line to stand in. Nearby, Amos Achola said he arrived at the polling station at 2 a.m. and was one of the first to vote. 
 
 Kenyatta, a Kikuyu who is the son of Kenya's founding president, faces Raila Odinga, a Luo whose father was the country's first vice president. Polls show the two in a close race, with support for each in the mid-40-percent range. Eight candidates are running for president, making it likely Odinga and Kenyatta will be matched up in an April run-off, when tensions could be even higher. 
 
 Most voters in Kibera, like Achola, support Odinga. 
 
 "I think he wins but if he doesn't win I'll abide by the outcome," Achola said. "The other guy is also a Kenyan. If Kenyatta wins I'll accept it but I won't like. But I don't want violence." 
 
 New technology _ in part to prevent the allegations of rigging that haunted the 2007 vote _ appeared to slow down early voting. At the Mutomo Primary School in Gatundu, where Kenyatta is expected to cast his ballot, voting officials seemed overwhelmed by the finger-print technology. The election worker behind the computer looked nervous and sometimes scratched his head. 
 
 The first person to vote, an eldery woman, cast her ballot at 6:25 a.m., 25 minutes after the polls opened. 
 
 In Mombasa, police boss Aggrey Adoli said that police were attacked at 2 a.m. by a marauding gang while on patrol. He didn't immediately confirm a death toll but reporters at the scene said police indicated that up to five officers and several attackers were killed in a fight that involved guns and machetes. 
 
 A late Sunday attack in the city of Garissa, near the Somali border, killed two people, including a Red Cross paramedic and a driver. Officials said a candidate for parliament had been the target but was not hit. 
 
 Garissa County Commissioner Mohamed Ahmed Maalim said Sunday that officials intercepted communications that indicated terror attacks were planned. Maalim said soldiers are patrolling the region to prevent attacks from al-Shabab, the al-Qaida-linked Somali militant group. He said 300 specialized troops known as GSU are patrolling the Dadaab refugee camp, where more than 400,000 Somalis live. 
 
 In the weeks leading up to Monday's vote, described by Odinga as the most consequential since independence from the British in 1963, peace activists and clerics have been praying that this time the election is peaceful despite lingering tensions. 
 
 Odinga's acrimonious loss to President Mwai Kibaki in 2007 triggered violence that ended only after the international community stepped in. Odinga was named prime minister in a coalition government led by Kibaki, with Kenyatta named deputy prime minister. 
 
 Some 99,000 police officers will be on duty during an election in which some 14 million people are expected to vote. 
 
 ___ 
 
 Associated Press reporter Daud Yussuf in Garissa contributed to this report. Rodney Muhumuza reported from Gatunda.
– Kenya chooses a president today in a vote overshadowed by fears of a repeat of the ethnic violence that killed more than 1,200 people in the weeks after 2007's election. The vote got off to a violent start when a mob of 200 secessionists armed with machetes ambushed and killed five police officers in the coastal city of Mombasa, the AP reports. Another police officer was killed in a separate attack by the same group; a police official said seven people died in that attack. Officials have warned that criminals plan to disguise themselves as police to disrupt voting in some areas, and there are fears of attacks from Somali militants. Kenyans are also choosing members of parliament, senators, and 47 county governors, but all eyes are on the presidential contest dominated by Prime Minister Raila Odinga and Deputy Prime Minister Uhuru Kenyatta, the BBC reports. There is a long history of tension between the two candidates' tribes, and Kenyatta is facing a trial at the International Criminal Court for his role in 2007's violence. President Mwai Kibaki, who is not seeking re-election, issued a plea for Kenyans to vote peacefully and for the losers to accept defeat.