Founding a dynasty meant marrying – or rather remarrying, since Henri IV was still the legitimate spouse of Marguerite de Valois, whom he had married just prior to the St Bartholomew's Day massacre. Although she had born him no children and they had been separated since 1585, he needed a divorce in due form before he could wed again.
However, Marguerite had been dragging her feet for some time. Isolated at her Chateau d'Usson in Auvergne, where Henri had her under house arrest, she knew, paradoxically, that agreeing to annul the marriage would earn her freedom. But she was not about to step aside for just anyone, and certainly not that "strumpet" Gabrielle d’Estrées, with whom Henri had fallen in love in 1590.
It took the death of Gabrielle in 1599 and marriage negotiations with the Florentine Marie de Médicis for Marguerite to give her consent. Discussions got underway with the pope to obtain the annulment. Every sort of excuse was invoked, the most decisive one being that Henri and Marguerite were spiritually related since Henri II, Marguerite's father, was also Henri's godfather (ostensibly represented by Cardinal de Bourbon at the baptism). It was a deceptive pretence, but one that suited everyone involved. On 24 October 1599, Clément VIII signed a papal bull annulling the marriage.