At the end of 1877, Pedro II paid a visit to Caxias and ascertained that he could no longer remain in office. The entire cabinet resigned on 1 January 1878. His health problems had become so troubling that he had been asking repeatedly to resign since early 1876. Caxias was not only afflicted by concerns over his declining health, but increasingly felt a sense of alienation. He did not feel he could play a relevant role in politics. He belonged to an older generation who perceived the Emperor (and consequently, the monarchy) as essential for holding the nation together.