The Republicans were dealt a humiliating blow during the midterm elections.