He wrote five romantic novels: "Ressurreição", "A Mão e Luva", "Helena" and "Iaiá Garcia". The books were a success with the public, but literary critics considered them mediocre. Machado suffered repeated attacks of epilepsy, apparently related to hearing of the death of his old friend José de Alencar. He was left melancholic, pessimistic and fixed on death. His next book, marked by "a skeptical and realistic tone": "Memórias Póstumas de Brás Cubas" (Posthumous Memoirs of Brás Cubas, also translated as "Epitaph of a Small Winner"), is widely considered a masterpiece. By the end of the 1880s, Machado had gained wide renown as a writer.