After a brief stay in the residence of Cardinal Riario, Caterina embarked from Livorno to Florence, where her children were waiting for her. In Florence, Caterina lived in the villas which had belonged to her third husband Giovanni de' Medici, often staying at the Villa Medici di Castello. Soon, she complained of being mistreated and living in a straitened financial situation. For many years she conducted a legal battle against her brother-in-law Lorenzo de' Medici for the custody of her son Giovanni, who was entrusted to him during her detention. In 1504, her son was finally returned to her, because the judge recognized that her confinement as a prisoner of war was not comparable to the detention of a criminal. With the death of Pope Alexander VI on 18 August 1503, Cesare Borgia lost all his power. This reopened the possibility of restoring to power all the old feudal lords of the Romagna who had been deposed. Caterina lost no time in sending letters to adherents, and pleaded her case to Pope Julius II in her own name and that of her son Ottaviano Riario. The new Pope was favourable to restoring the lordships of Imola and Forlì to the Riarios, but the populace of both cities declared that a majority of the people opposed the return of the Countess, so that the domain passed instead to Antonio Maria Ordelaffi on 22 October 1503. After having lost her last chance to return to her former power, Caterina spent the last years of her life dedicated to her children, in particular to her youngest son Giovanni (her favourite and the most like her in personality and character). She also conducted a series of experiments in alchemy, the results of which were recorded in a manuscript titled "Gli Experimenti de la Ex.ma S.r Caterina da Furlj Matre de lo inllux.mo S.r Giouanni de Medici", or "Gli Experimenti". The book, dating back to 1500, contains a total of 454 recipes, roughly 66 of which are cosmetic related, 358 medicinal, and 38 alchemical. Her experimental activities situate her at the origins of a Medici interest that stretched well into the seventeenth century. In April 1509 Caterina was stricken by a severe case of pneumonia. She appeared to have recovered, but had a relapse of the disease, after which she made her will and arranged her burial. At the age of forty-six years, "The Tiger of Forlì", who had "frightened all of Romagna", died on 28 May 1509.