The election has been marred by violence as demonstrators took to the streets of major cities to protest against the vote.