Kenyans are voting in large numbers in an election that pits President Uhuru Kenyatta against challenger Raila Odinga amid fears the east African economic hub’s poll battle could spark deadly ethnic violence.

Mr Kenyatta, voting in his birthplace of Gatundu, north of Nairobi, said: “I feel good. I feel positive because we ran a positive campaign.”

The 55-year-old, accompanied by his wife Margaret, his mother and two of his three children, urged Kenyans to vote peacefully and go home to await the results.

President Kenyatta greets supporters after casting his vote (Ben Curtis/AP)President Kenyatta greets supporters after casting his vote (Ben Curtis/AP)

Mr Odinga, 72, voted in the poor area of Kibera, an opposition stronghold in the capital Nairobi, and was surrounded by well-wishers.

He urged supporters to gather on Wednesday in a central park for what he predicted would be a celebration.

Mr Kenyatta, the son of Kenya’s first president after independence from British colonial rule, campaigned on a record of major infrastructure projects, many backed by China, and claimed strong economic growth.

Mr Odinga is also the son of a leader of the independence struggle and has cast himself as a champion of the poor and a critic of endemic corruption in many state institutions.

Voters formed long queues at many polling stations before dawn, waiting for the chance to cast ballots in the tightly-contested race for the presidency as well as for more than 1,800 elected positions, including governors, legislative representatives and county officials.

A key concern was whether Kenya would echo its 2013 election – a mostly peaceful affair despite opposition allegations of vote-tampering – or the 2007 election, which led to violence fuelled by ethnic divisions that killed more than 1,000 people.

“This is a positive feedback for us,” polling official James Njaya said of the high turnout in Kibera, a poor area in Nairobi, the Kenyan capital.

More than 300 people, including ethnic Maasai draped in traditional red blankets, waited for hours in the dark before a polling station opened in the Rift Valley town of Il Bissil.

Kenyan television also showed long queues of voters in the port city of Mombasa.

Kenyans queue at the polling stationVoters queue to cast their ballots at Kondele Polling Centre Grounds, Kisumu, Kenya (Amos Aura/AP)

Reaction to the result could partly depend on the performance of Kenya’s electoral commission, which will collect vote counts from more than 40,000 polling stations.

Fears of violence were increased by the murder of an electoral official in charge of technology days ahead of the election.

The election commission has said that about 25% of polling stations will not have network coverage, meaning officials will have to move to find a better signal and transmit results by satellite phones.

Lydia Gathoni KiingatiLydia Gathoni Kiingati, 102, has her finger inked after casting her vote at a polling station in Gatundu, north of Nairobi (Ben Curtis/AP)

Kenya has nearly 20 million registered voters.

Former US secretary of state John Kerry is among thousands of observers who are monitoring the election, in which many voters are expected to vote along ethnic lines.

Mr Kenyatta is widely seen as the candidate of the Kikuyu people, the country’s largest ethnic group.

Mr Odinga is associated with the ethnic Luo voting bloc, which has never produced a head of state.

In a speech on Monday night Mr Kenyatta appealed to Kenyans to vote peacefully in large numbers.

“How you have voted should not in any way reflect or change the manner in which you have related to your neighbour,” he said.

“Shake their hand, share a meal and tell them, ‘Let us wait for the results’, for Kenya will be here long after this general election.”