Election day in Kenya

Kenyan election officials began counting votes on Tuesday, as results trickled in from a hard-fought contest between the country’s foremost political dynasties and election authorities called for calm.

Shrouded in fears of violence, the vote pits President Uhuru Kenyatta, the 55-year-old businessman son of Kenya’s founding president, against Raila Odinga, a 72-year-old former political prisoner and son of Kenya’s first vice-president.

The rivals are facing each other for the second time, with opinion polls putting them neck-and-neck after two months of campaigning marked by fiery rhetoric but public speeches largely free of the ethnic hate that has sullied previous contests.

“During this critical phase, we urge all Kenyans to exercise restraint as we await official results from the polling stations and indeed as they start trickling in,” the electoral commission said in a statement.

Odinga comes from the Luo people in western Kenya, an area that has long felt neglected by the government and resentful of their perceived exclusion from political power. Kenyatta is Kikuyu, an ethnic group that has supplied three of Kenya’s four presidents since independence from Britain in 1963.

The razor-thin polling has increased the chances of glitches – innocent or otherwise – despite a high-tech electronic voting system. That could be grounds for the loser to allege fraud, as Odinga did in 2007 and in 2013. Given his age, this is probably Odinga’s last crack at the top job.

A decade ago, vote tallying was abruptly stopped and the incumbent president declared the winner, triggering an outcry from Odinga’s camp followed by outbreaks of ethnic violence in which 1,200 people were killed and 600,000 displaced. (Reuters)

See more news-related photo galleries and follow us on Yahoo News Photo Twitter and Tumblr.

Maasai voters queue in Saikeri

Maasai voters queue at a polling station in Saikeri, Kajiado West County, Kenya on Aug. 8, 2017. (Photo: Carl de Souza/AFP/Getty Images)

Officials count ballots

Electoral Commission officials count ballots at a polling station on Aug. 8, 2017 in Nairobi, Kenya. (Photo: Tony Karumba/AFP/Getty Images)

People queue to vote in Mombasa

People queue as they wait for a polling station to open to cast their votes in the presidential election in Mombasa, Kenya, Aug. 8, 2017. (Photo: Siegfried Modola/Reuters)

President Uhuru Kenyatta votes

Kenya’s President Uhuru Kenyatta casts his vote, accompanied by his wife Margaret, center-left, in Gatundu, north of Nairobi, in Kenya Tuesday, Aug. 8, 2017. (Photo: Ben Curtis/AP)

Kenyans queue in Gatundu

Kenyans queue to cast their vote outside a polling station during the presidential election in Gatundu, Kenya, Aug. 8, 2017. (Photo: Baz Ratner/Reuters)

A polling official marks a voter’s finger

A polling official marks a voter’s finger after casting his vote at a polling station in Nairobi, Kenya, Tuesday, Aug. 8, 2017. (Photo: Sayyid Abdul Azim/AP)

Women queue in Mombasa

Women queue as they wait for a polling station to open to cast their votes in the presidential election in Mombasa, Kenya, Aug. 8, 2017. (Photo: Siegfried Modola/Reuters)

Voters line up in Kibera

Voters line up in the early morning in cold weather at a polling station in the Kibera Slums Nairobi, Kenya, Tuesday, Aug. 8, 2017, to cast their ballot. (Photo: Khalil Senosi/AP)

A Turkana tribeswoman casts her ballot

A Turkana tribeswoman casts her ballot at a polling station during the election in a village near Baragoy, Kenya, Aug. 8, 2017. (Photo: /Goran Tomasevic/Reuters)

Raila Odinga after casting his vote

Kenyan Opposition leader Raila Odinga drives passing his supporters after casting his vote in Kibera slums in Nairobi,Kenya, Tuesday, Aug. 8, 2017. (Photo: Noor Khamis/AP)

A prisoner votes

A prisoner votes during the national election at the Kamiti Maximum Security Prison near Nairobi, Kenya, Aug. 8, 2017. (Photo: Baz Ratner/Reuters)

Voters queue in Mombasa

Voters queue to cast their votes at Ziwa la Ng’ombe polling station, in the coastal town of Mombasa, Kenya, Tuesday, Aug. 8, 2017. (Photo: AP)

Voters stand in line dressed in the Kenyan flag colors

Joseph Njoroge Kimani, 3, stands with his father James Kimani Njoroge, left, and mother Esther Wanjiru Njoroge, right, all wearing suits made in the colors of the Kenyan flag, as they queue to cast their votes in Gatundu, north of Nairobi, in Kenya Tuesday, Aug. 8, 2017. (Photo: Ben Curtis/AP)

People gather to vote in Nairobi

People gather to vote outside a polling station ahead of the opening of the presidential election in Nairobi, Kenya, early Aug. 8, 2017. (Photo: Thomas Mukoya/Reuters)

People check names on a voter registration

People check names on a voter registration list at the Olympic Primary School in Kibera, one of the largest slums in Africa, on Aug. 8, 2017 in Nairobi, Kenya. (Photo: Andrew Renneisen/Getty Images)

Security at a Kibera polling station

A Kenyan security personnel member stands at a polling station in Kibera, Nairobi, in Kenya, Aug. 8, 2017. (Photo: Thomas Mukoya/Reuters)

Election officials arrange ballot boxes

Election officials from the Independent Electoral and Boundaries Commission (IEBC) arrange ballot boxes and election material at a holding center before distribution to polling centers, in Nairobi, Kenya, Aug. 7, 2017. (Photo: Baz Ratner/Reuters)

Campaign signage in Kibera

A Kenyan girl brushes her hair in the Kibera slum in Nairobi, Kenya, Monday, Aug. 7, 2017. (Photo: Jerome Delay/AP)

Kenyan soldiers are assigned polling stations

Kenyan soldiers assigned to polling stations get their instructions in Nairobi, Kenya, Monday, Aug. 7, 2017. (Photo: Jerome Delay/AP)

Campaign signage in Kibera

Kenyans walk past election posters in the Kibera slum in Nairobi, Kenya, Monday Aug. 7, 2017. (Photo: Jerome Delay/AP)

The entrance of a polling station

A child plays at the entrance of a polling station pasted with campaign posters in Sarang’ombe ward ahead of the Presidential election at the Kisumu Ndogo village in Kibera slums of Nairobi, Kenya, Aug. 6, 2017. (Photo: Thomas Mukoya/Reuters)

Raila Odinga dances at his final rally

Main opposition leader Raila Odinga, right, dances in front of his supporters at his final electoral campaign rally at Uhuru Park in Nairobi, Kenya, Saturday, Aug. 5, 2017. (Photo: Ben Curtis/AP)

Raila Odinga supporters

A supporter of opposition leader Raila Odinga wears oranges, the party’s symbol and color, and holds a placard of Odinga, at his final electoral campaign rally in Uhuru Park in downtown Nairobi, Kenya, Saturday, Aug. 5, 2017. (Photo: Ben Curtis/AP)

Opposition supporters rally

Supporters of Kenyan opposition National Super Alliance (NASA) coalition cheer during their final campaign rally at the Uhuru park grounds in Nairobi, Kenya, Aug. 5, 2017. (Photo: Thomas Mukoya/Reuters)

An opposition supporter

A supporter of Kenyan opposition National Super Alliance (NASA) coalition arrives for their final campaign rally at the Uhuru park grounds in Nairobi, Kenya, Aug. 5, 2017. (Photo: Thomas Mukoya/Reuters)

An opposition supporter holds up a placard

A supporter of Kenyan opposition National Super Alliance (NASA) coalition’s Presidential candidate Raila Odinga displays a placard during their final campaign rally at the Uhuru park grounds in Nairobi, Kenya, Aug. 5, 2017. (Photo: Thomas Mukoya/Reuters)

President Uhuru Kenyatta laughs at a rally

Kenya’s President Uhuru Kenyatta laughs at a song that was played over the loudspeakers, at an election rally in Uhuru Park in Nairobi, Kenya, Friday, Aug. 4, 2017. (Photo: Ben Curtis/AP)

President Uhuru Kenyatta supporters cheer

Supporters of Kenya’s President Uhuru Kenyatta cheer at an election rally in Uhuru Park in downtown Nairobi, Kenya, Friday, Aug. 4, 2017. (Photo: Ben Curtis/AP)

A supporter wears a cloth wrap with Kenyatta’s image

A supporter wears a cloth wrap showing Kenya’s President Uhuru Kenyatta, with writing in Swahili reading “President Uhuru, Five More” referring to the wish for another 5-year term, at an election rally in Uhuru Park in Nairobi, Kenya, Friday, Aug. 4, 2017. (Photo: Ben Curtis/AP)

Donkeys wearing masks depicting Kenyatta

Donkeys wearing masks depicting Kenya’s President Uhuru Kenyatta stand during a Jubilee Party election rally in Nairobi, Kenya, July 21, 2017. (Photo: Baz Ratner/Reuters)