In 1825, Frederick IV, Duke of Saxe-Gotha-Altenburg, who was the uncle of Ernest's first wife Louise, died without an heir. This resulted in a rearrangement of the Ernestine duchies. It was only as a member of the Ernestine dynasty (and not as Louise's husband) that Ernest had a claim on the late duke's estates. However, he was at that time in the process of divorcing Louise, and the other branches used this as a leverage to drive a better bargain for themselves by insisting that he should not inherit Gotha. They reached a compromise on 12 November 1826: Ernest received Gotha, but had to cede Saalfeld to Saxe-Meiningen. He subsequently became "Ernest I, Duke of Saxe-Coburg and Gotha". Although he had given a constitution to Coburg in 1821, he did not interfere in the system of government in Gotha.