Nairobi, Kenya (CNN) Kenyans eagerly and anxiously awaited the final results in a hotly contested election on Tuesday pitting incumbent President Uhuru Kenyatta against former Prime Minister Raila Odinga.

Independent Electoral and Boundaries Commission spokesman Andrew Limo said turnout looked "huge" as Kenyans cast ballots at more than 40,000 polling stations on Tuesday.

Videos circulated on social media of skirmishes and tear gas allegedly being used in some parts of the country earlier Tuesday, but CNN did not witness any violence.

The atmosphere at several polling stations in Nairobi was relaxed as Kenyans came out in droves, eagerly queuing in orderly lines to vote.

Latest developments

- Odinga reportedly questions running results as counting shows Kenyatta in lead

- Minor technical issues have been reported and were being addressed - officials

- Polls closed at 5 p.m. (10 a.m. ET) but those already in line, or in an area affected by delays, were allowed to vote

Kenyatta, the son of Kenya's founding president and the country's youngest leader at 55, is seeking a second five-year term. If he loses, he'll make history as the only incumbent president not to win re-election.

Odinga, who's running for president for the fourth time, served as prime minister between 2008 and 2013 and is the incumbent's main challenger.

As counting proceeded, Odinga questioned numbers posted by the election commission, which showed on its website that Kenyatta was in the lead, Reuters reported.

"They (the results) are fictitious, they are fake," he said, according to Reuters. "We have our projections from our agents which show we are ahead by far."

Kenyan President Uhuru Kenyatta casts his vote on Tuesday.

Limo acknowledged claims of malfunctioning voting machines, which have circulated online, saying there have been "three or four cases of malfunction where the system needed restarting," but added that for the most part things have "gone well."

The IEBC said in a statement that extra support staff had been brought into service to resolve minor technical issues and confirmed that anyone already in line, or in an area affected by delays, when polls closed would still be able to cast their ballot.

Kenyans wait in line at a polling station in Eldoret on Tuesday.

Voters line up at a station in Kibera.

Inmates vote at Kisumu prison. This is the first time that inmates in Kenya were allowed to vote; they were only permitted to vote for presidential candidates.

"We are eager to choose our leaders, even in the rain," one voter, Susan Mukami, told CNN at the Moi Avenue Primary School polling station in Nairobi.

Kenyan YouTube personality and radio presenter Xtian Dela said he'd waited four hours to cast his first ever vote in Nairobi.

"[I] am super excited about the election this year ... I just had to exercise my civic duty: To hire and fire my employees," he told CNN.

We all cheered for this amazing 90yr old granny who came out in the cold to vote!



How my Retweets for her?#KenyaDecides #Kivumbi2017 pic.twitter.com/NG20nqUNTS — Thee Trend Setter ™ (@xtiandela) August 8, 2017

Dela added: "I voted for leaders who I believe will end tribalism. Don't get me wrong, health, jobs, economy, etc are very important. But what's the need of having all that if we are hating on each other?"

Dela also posted a video on Twitter showing voters cheering for "an amazing 90-year-old granny who came out in the cold to vote," he said.

Some voters praised authorities for what they described as a better-run election than the one in 2013.

"Last election I arrived at 7 a.m. and voted at 5 p.m. It took me 30 minutes this year," said Joseph Birengo, 40, one of the last people to arrive at the a central Nairobi polling center."

"I think it is a very welcome step to see wide and diverse participation in these elections and I really hope that the rights of all Kenyans will prove to have been respected," said Marietje Schaake, European Union chief monitor.

Voters cast their ballot in Kisumu, on Lake Victoria.

A police officer directs voters toward the back of the line at a Nairobi polling station.

Kenyans were still lining up at dusk at a polling station in downtown Nairobi.

Other voters shared photographs on social media of their fingers marked with purple dye, which is being used by election officials to ensure people only vote once.

#KenyaDecides. I have the power to hire and fire! IMEKWISHA pic.twitter.com/q2bLSb6l4r — Reuben Zia (@zia_reuben) August 8, 2017

Kenya's Elections Observation Group said over 8,000 representatives had been deployed to all 47 counties and 290 constituencies in an effort to ensure a fair democratic process.

The group said some of its observers had been denied access to polling stations while others had their phones confiscated upon arrival.

The group also noted delays at voting stations due to the late arrival of polling materials and officials.

Lydia Gathoni, a Kenyatta supporter, voted just after dawn at a station north of Nairobi.

The government issued a news release thanking citizens "for turning up to exercise their civic duty" and "being proactive in reporting election malpractices at polling stations."

"Such exceptional collaboration between members of the public and the police has enhanced and eased the work of security agents. Indeed, every situation has been contained and appropriate action taken. None of these incidents have affected the process of voting."

Fears of violence

Kenya's last election in 2013 was mainly peaceful, but a decade ago, the country plunged into widespread violence in the aftermath of the 2007 vote.

More than 1,000 people were killed in months of bloodshed following the 2007 election after Odinga -- defeated by then-President Mwai Kibaki -- claimed the vote was rigged.

Odinga, 72, has accused Kenyatta of attempting to rig this year's election. Kenyatta in turn has said Odinga is attempting to divide the country.

As Kenyatta cast his ballot, he said he would be willing to step down if he lost to his longtime rival.

Raila Odinga casts his ballot in Nairobi on Tuesday.

The killing of a senior election official days before the election sparked tensions last week. Chris Msando was head of information technology for Kenya's Integrated Electoral Management System. While his department was responsible for voter identification and result transmission technology for the elections, it's unclear whether his killing was related to the election.

Leading up to the poll, wary residents stocked up on food and water amid fears of a return to violence.

"I think scars from the past have underlined the importance of democracy and peaceful co-existence," Schaake said.

A close margin

Results are not expected until Wednesday at the earliest, but with the predicted margin between the two leading presidential candidates razor thin, it could be several days before a winner can be declared.

Officially, the electoral commission has up to a week to announce the outcome.

We will compensate polling stations that opened late with the same amount of time lost. All will vote — IEBC (@IEBCKenya) August 8, 2017

Heavy rain overnight hampered transport in some parts of the country, causing delays at polling stations. The IEBC extended voting hours in the affected areas and deployed helicopters to ferry materials and polling officials to the stations.

Local "boda boda" (motorbike taxi) drivers told CNN they had been ferrying people to their local stations for free.

More than 11,000 polling stations -- around a quarter of the total -- are without decent cell phone coverage, meaning returning officers have had to use satellite phones and other means to transmit results.

Almost 20 million people were registered to vote, and more than 14,000 candidates were running in elections to choose a new president as well as members of parliament, senators, governors and local councilors.

Joseph Njoroge Kimani, 3, stands with his parents as they wait to vote in Gatundu.

A Maasai woman casts her vote in Kajiado County, some 100 kilometers south of the capital.