The ruling conservative party suffered its worst result in more than two decades, after four years of severe spending cuts and a string of corruption scandals.