The complex presidential , legislative and gubernatorial elections , which began on Sunday and were scheduled to last three days , had been hoped to transform Sudan from a nation emerging from decades of civil war to a democratic state .