As Kenya prepares for a presidential election next Monday, it's trying to prevent a recurrence of the last such poll, in December 2007, when more than 1,000 people were killed in postelection violence.
Last time, technology helped incite that violence. This time, the hope is that technology will help prevent a similar outburst.
Last time around, a text message came on Dec. 31, 2007, four days after a presidential election that many people in the Kalenjin tribe thought was rigged.
The text message said that the most powerful Kalenjin figure in the government, William Ruto, was killed. This wasn't true. But the rumor went viral, from cellphone to cellphone.
"That was around in the morning, and by 5, people were moving with their properties, the houses were being torched, and you're just seeing smoke," says a man named Alex, who asked that his last name not be used.
Alex was in Kenya's Rift Valley, where gangs of youths with gas canisters and machetes attacked their ethnic rivals.
Now Alex is part of a private research project called Umati that scours social media for potentially dangerous speech — speech like that 2007 text message, which he says wasn't just some falsehood. It was written to incite.
"It was hate speech, because whatever was being written there, on the text message, it was for people to react against certain kind of people," he says.
So now when Alex or his teammates find a text or a tweet they're worried about, they report it to a network of bloggers, activists and tech geeks overseen by Daudi Were.
"We're talking about going beyond monitoring a vote; we're calling on citizens to protect their vote," Were says.
Were directs a project called Uchaguzi, or election, in Swahili. Among other things, it connects on-the-ground reports with law enforcement officials.
In its inaugural run during the 2010 constitutional referendum, a voter sent a text message to the project that said simply: "Young men congregating with machetes outside a polling station in Molo."
Molo is 125 miles away from the capital, Nairobi. But Were says that within 15 minutes, "two trucks full of policemen turned up at that polling station, acted as a deterrent. The young men went away."
So what happened in those 15 minutes?
The text message was mapped and verified with on-the-ground election officials and forwarded to police — and this was done out of an air-conditioned technology hub in Nairobi with Super Mario Bros. posters and a foosball table.
So whatever transpires this election, it will be under the scrutiny of a vastly more wired Kenya. In the past four years, the number of Kenyans who own cellphones climbed from 8 million to 30 million — which means more cellphone cameras to catch unguarded political moments.
For example, last year politician Ferdinand Waititu urged a crowd in Nairobi to find people from the Massai ethnic group and chase them from their homes. Several people were killed in the riots that ensued.
When the video was posted on YouTube, Waititu was disciplined by his party and fired from his post. But that same politician is now leading the race to become governor of Nairobi province.
Hate speech and ethnic baiting can still win votes.
"There are two competing facts in the narrative of Kenyan politics," says Wangui Kaniaru, a corporate lawyer in Nairobi.
"One is that once someone goes into a voting booth, they vote tribally. They pick a person from their ethnic group and from their ethnic community. That's the bias that we always have had historically in every election we've been through as a country," she says. "The other fact is that Kenya as a country is more prosperous and better educated than ever before. If the middle class were a tribe, they'd actually be the biggest tribe in this country."
So why don't they vote as a class? Kaniaru says it's because most of them don't vote at all. Her fellow Kenyan professionals, she says, have given up on the government actually providing services. They hire private security guards and take their kids to private schools.
"You have private garbage collection," she says. "And we don't recognize that that's a political problem that requires a political solution."
Kaniaru founded a website — SwingVote2013.org — that lays out some election math and why the middle-class vote could swing the outcome. She says her target audience is the 1 million Kenyans on Facebook.
And she hopes that next week, when they go to the polls, all this new Kenyan connectedness will translate into actual change.