KENYANS will tomorrow vote in the most important presidential election in the country's 50 years of independence.

For most people, their memories are still fresh of the 1300 people who were hacked, shot or beaten to death during and following the last elections in late December 2007, when bands of youths swept through slum settlements setting shacks on fire and murdering indiscriminately.

Ordinary Kenyans are nervous about their new opportunity to cast their ballots, still wondering how their nation, believed to be too well educated and economically advanced for ethnic mayhem, erupted five years ago and found itself on the brink of all-out civil war. They remain traumatised and embarrassed by the two months politically stoked tribal strife.

Worse still, the government itself perpetrated much of the violence, organising Kikuyu militias to attack other tribespeople. Security forces killed and burned a church in which 35 people perished.

Human rights activists estimate that more than 3000 women were raped in the weeks of violence following voting day on December 27, 2007. Men were also victims of sexual violence: sodomised or forcibly circumcised with terrible physical consequences. Some 60% of gang rapes were attributed to the country's security forces. No-one has been convicted of these sexual offences, and numerous victims told reporters: How do we report the government to the government?

Because Kenya failed to convene courts to try those responsible for the tribe-on-tribe attacks, The Hague-based International Criminal Court (ICC) has indicted four top Kenyan politicians for planning and inciting the violence.

One of those indicted is retiring Deputy Prime Minister Uhuru Kenyatta, son of Kenya's first President, Jomo Kenyatta, one of the country's richest men, and one of the two leading Presidential candidates.

Kenyatta's vice-president running mate, William Ruto, a former high school teacher who became a government minister before being sacked for corruption, has also been indicted by the ICC for crimes against humanity.

Kenyatta is running against retiring Prime Minister Raila Odinga, heir of another Kenyan political dynasty: his father served as the country's first vice-president while Jomo Kenyatta was head of state. A long-time opposition leader, now aged 68, Odinga has vied for the presidency twice before, and tomorrow's voting is widely seen as his last shot at moving into State House in the capital, Nairobi.

He took up the deputy prime ministership following the last turbulent election as part of a power-sharing agreement to end the violence.

Kenyatta and Odinga are members of the country's two most prominent tribes – the Kikuyu and the Luo. The Kikuyu, Kenyatta's tribe, account for 22% of the country's 41 million people, concentrated in the centre of the country in the Rift Valley, around Mount Kenya and in Nairobi.

The Luo, 13% of the population, are centred in the west around the shores of Lake Victoria.

Many Luo, Kikuyus and others from many smaller tribes, however, live in Mathare, one of Nairobi's most dangerous slums. Pre-election Luo-Kikuyu tension there has been extremely high, and already more than 200 people have been killed throughout the country in recent months.

Ominously, civic groups report a dramatic rise in the sale of machetes and yesterday, shops and other businesses were closing in case of violence.

Polls predict a close race, with the two frontrunners each garnering 44% of the vote. (Six other candidates, including Peter Kenneth of Eagle Coalition, are expected to share the remaining votes). If no candidate receives 50% in the first round, there will be a run-off between the two top candidates in early April.

However, this would cause a huge complication in an already complex contest – Kenyans have to vote six times for many candidates to different bodies, including the National Assembly, the upper house Senate and 47 regional governorships, with a half-brother of US President Barack Obama contesting one governorship. The run-off would coincide with the current scheduled opening of the trial in The Hague on April 10 against Kenyatta, Ruto, former head of the civil service and secretary to the cabinet Francis Muthera, and radio journalist Joshua arap Sang.

Sang is specifically charged with using hate speech on government radio, recalling the Rwanda genocide of 1994. It is alleged he broadcasted coded messages to co-ordinate attacks during his regular morning talk show.

"The ICC is part and parcel of the Kenyan political crisis," said Kwando Opanga, a political commentator for The Sunday Nation newspaper. "This general election is about the last general election."

The permutations and possible consequences of the presidential vote are endless. Many Kenyans will vote for Odinga and against Kenyatta simply as a protest against their ICC-indicted leaders. Odinga's supporters might also support him with the longstanding "get rich quick" Kenyan political aphorism in mind: "It is our turn to eat." There is a deep political tradition in Kenya of awarding power, influence and financial gain to members of a powerful man's own ethnic community.

Odinga, who has been detained three times by different state presidents, believes, as do his supporters, that he won the last election and that it was stolen from him by ballot-rigging and other corrupt means. However, he is no longer quite the young reformist that he has always posed as. He, too, has "eaten well" as prime minister.

With the ICC charges already an exceedingly dangerous factor supercharging the election, the New York and London-based Human Rights Watch (HRW) says the risk of renewed violence is "perilously high" if Odinga is once again denied power.

Out of 5000 files connected to post-election crimes in 2007-8, only 14 people have been convicted, according to HRW, which warns: "The pro-Odinga communities are preparing. They are arming themselves."

Running in Kenyatta's favour is the charge by many Kenyans that the ICC is a Western invention highly biased against Africans – although the ICC's chief prosecutor, Mrs Fatou Bensouda, is an African lawyer from Gambia. Fear of retaliation from an Odinga Presidency is a common refrain among many voters who say they support Kenyatta, however grudgingly.

While Kenyatta has said he will cooperate with the ICC, many Kenyans are convinced that if he and Ruto are elected, they will capitalise on the national endorsement to sidestep the international court entirely rather than rule the country by Skype from a jail cell in the capital of The Netherlands.

"Uhuru (Kenyatta) and Ruto have no plans to go to the International Criminal Court. That's their calculation: it's why they badly want to win," says Boniface Mwangi, a political activist and photographer who received international acclaim for his dramatic images of the 2007-8 post-election violence. His view is a common one, and Kenyatta, despite his assurances of cooperation with the ICC, has also said: "If Kenyans do vote for us , it will mean they have questioned the process that has landed us at the ICC."

The biggest potential cause of violence would be a victory for Odinga and a refusal by Kenyatta to report to the ICC. If Odinga delivered Kenyatta to The Hague there would be risk of inter-tribal violence.

"Violence is not inevitable, but the warning signs are too bright to ignore," says HRW's Africa director, Daniel Bekele. "The underlying causes of past election-related violence remain in place, and in parts of the country the tension is escalating."

The election of Kenyatta and Ruto would force Britain and other foreign countries to make tough decisions regarding continued partnerships with Kenya – a regional powerhouse, tourism hub, friend of the West, and partner in fighting extremism in neighbouring Somalia and fostering peace in Sudan and South Sudan.

Foreign investors are already holding back until a new government is in place. Aid organisations are standing by to provide help, if necessary, to a new wave of internal refugees. More than 100,000 people were displaced in the last round of electoral violence.

Fresh instability would hobble the rest of East Africa, particularly landlocked Uganda, Rwanda, Burundi and the Democratic Republic of the Congo, which were badly hit five years ago and still depend on Kenya's port of Mombasa. These countries have been heavily importing essential supplies in case the worst happens.

Kenya's chronically understaffed police force fears it will be unable to cope if there in a repeat of 2007-8.

Police Officer Christine Fuhara, stationed in the Rift Valley town of Eldoret, describes the last election as the worst days of her career: "We had to collect the corpses, young and old, women, men, even children," she says. "It was appalling. We had just 40 officers. We had no chance to deter people from violence."

Kenyans approved a new Constitution in 2010 that brought about important reforms, making the judiciary and police more accountable. But if history is a guide, it is unlikely that the courts will crack down on the masterminds if there is a fresh eruption of political violence. The political class, despite the dire warnings of 2007-8, remains venal, crime, corruption and favouritsm remain rife.

Although the toxic mix of traditional tribal rivalries, shot through with social and economic grievances, remain, the West regards Kenya as so important to Africa's stability and economic growth that it has increased its electoral aid six-fold. Donors supported the last election with US$13m. This time they have given more than US$100m, including US$37m from the United States to support the country's reformed election commission, to train journalists and fund civic education programmes.

This time, young people, sickened the top posts are being contested by the same politicians who stoked the ethnic savagery last time, have formed their own technologically-literate organisations to try to foster a peaceful post-electoral outcome.

A group of young Kenyans is working on a project called Uchaguzi that seeks to turn Kenyans with cellphones into reporters who can relay anything violent or untoward happening in their areas.

Last time, although the violence appeared to outsiders to be spontaneous, it was actually orchestrated by top politicians and their henchmen using cellphone SMSes. Rumours, many untrue, spread and homes and churches were torched as rival tribal gangs mounted deadly tit-for-tat raids. This time, says 24-year-old volunteer Leo Mutuku (a young woman, despite her first name), Uchaguzi and other similar organisations in Kenya's lively social media are attempting to turn the technological tables against the authorities. Uchaguzi will receive tens of thousands of SMS reports and turn them into live maps and bulletins following the progress of the election and its aftermath. Where necessary, it will report violence to the police. "Technology was used last time to co-ordinate the violence," says Ms Mutuku. "This time we'll use it to counter violence."

But the efforts of the young Uchaguzi volunteers may be too late to convince many older Kenyans that it is worth voting in a democratic election.

Grace Wambui, a 52-year-old mother of four, is one of a quarter million Kenyans who are still internal refugees from the last round of violence and are still waiting to be rehoused. She watched appalling violence in Eldoret and is now a kind of mayor for a refugee shack settlement with no school, no police and no doctor. Those who are too sick to walk, she says, are carried to the nearby road on sacking where they are picked up to be taken to a clinic in the nearest town.

In Eldoret in 2007-8 Mrs Wambui voted as a Kikuyu for the incumbent President, fellow Kikuyu Mwai Kibaki, who is now stepping down after two terms in office. But, she says. She was shocked to watch Kikuyus chopping off the limbs of non-Kikuyus with machetes and beating others to death with rocks in the main streets.

Officially, she says, she and other refugees do not exist. The government insists that all victims of the violence in 2007 and 2008 have either been successfully resettled or have returned to their homes.

Will she take part in the elections this time? "No, I won't vote," says the refugees camp 'mayor.' Waving her arm towards the tattered plastic shelters in the ragged settlement in a parched area of the Rift Valley, she says: "I voted once, and you can see what that brought me."