NAIROBI, Kenya — It took the police the better part of two hours to haul away the bricks that had been stacked, at some point in the night, in front of the polling station at the Olympic Primary School.

But few people in the sprawling Nairobi neighborhood of Kibera — as in many other places across Kenya — wanted anything to do with Thursday’s historic vote for president. Some Kibera residents spent the day lobbing stones at the police, while the police spent the day firing tear gas back.

“This vote is a massive flop, whichever way you cut it,” said Maina Kiai, a leader of a Kenyan civil society coalition and a former United Nations special rapporteur.

For decades, Kenya has been struggling to move from the shadow of dictatorship to a truly inclusive democracy, and the country has sacrificed much on that journey. Ten years ago, more than 1,100 people died and hundreds of thousands were displaced after an election many thought was stolen.