The Kenyan presidential candidate who faces charges at the international criminal court has taken an early lead as votes were counted the day after the country's election.

With about a third of ballots counted, early results showed the deputy prime minister, Uhuru Kenyatta, with 54% of the vote, ahead of the prime minister, Raila Odinga, with 41%. Few votes have been counted from Odinga's stronghold, the western city of Kisumu.

Isaak Hassan, the chairman of Kenya's electoral commission, said on Tuesday that results from 10,000 polling stations were in, but officials await results from 23,000 more stations.

"Nobody should celebrate, nobody should complain," he said. "We therefore continue to appeal for patience from the public, the political parties as well as the candidates."

The candidates need more than 50% of the vote to win, otherwise the two will contest a runoff in April. The vote commission has seven days to release certified results.

Hassan said the number of spoiled ballots – was "quite worrying".

Long lines formed around the country on Monday. Election officials estimate that turnout was about 70% of the 14 million registered voters.

In the coastal city of Mombasa, three suspected members of the secessionist group Mombasa Republican Council were charged in court on Tuesday with the murder of four police officers during the elections.

On Monday, a group of 200 separatists set a trap for police in Mombasa in the pre-dawn hours, Inspector General David Kimaiyo said. Four officers were hacked to death with machetes, coast police boss Aggrey Adoli said.

The MRC had threatened to carry out election day attacks, Kimaiyo said.

The MRC believes Kenya's coast should be an independent country. Its cause, which is not defined by religion, is fuelled by the belief that political leaders in Nairobi have taken the coast's land for themselves, impoverishing indigenous residents.

In addition to the attack in Mombasa, police blamed the MRC for three deadly attacks in nearby Kilifi. An Associated Press reporter visited a morgue and saw four men wearing red bandanas – a sign of the MRC – who had been shot.

An AP tally of the violence found that four police and three MRC members died in Mombasa, while six government officials, four MRC members and two civilians died in the three attacks near the coastal city of Kilifi, according to police and mortuary officials. MRC representatives have denied any responsibility for the attacks.

After the polls closed, gunshots and an explosion could be heard in the city of Garissa, near the Somali border, as gunmen stormed two polling stations, said Farah Maalim, the deputy speaker of parliament. Security forces responded to the attack and the gunmen fled.

Kenya's capital, Nairobi, was quiet on Tuesday and no more violence had been reported elsewhere.

Kenyatta faces charges at the international criminal court over allegations he helped orchestrate post-election violence in 2007-08, when more than 1,000 people were killed.

The US has warned of consequences if Kenyatta wins, as have several European countries. Because Kenyatta is an ICC indictee, the US and Europe have said they might have to limit contact with him, even if he is president.

After President Mwai Kibaki was hastily named the winner of Kenya's 2007 vote, supporters of Odinga took to the streets in protest, a response that began two months of tribe-on-tribe attacks. In addition to more than 1,000 deaths, more than 600,000 people were forced from their homes.

Officials have been working to ensure that level of violence does not return during this election cycle. Both Kenyatta and Odinga have pledged to accept the results of a freely contested vote.