Ruling party suffers ‘huge’ defeat in East African state