Excerpts from Books and Wikipedia
"He initially kept the Protestant faith (the only French king to do so) and had to fight against the Catholic League, which denied that he could wear France's crown as a Protestant. After four years of stalemate, he converted to Catholicism to obtain mastery over his kingdom (reportedly saying, "Paris is well worth a mass"). As a pragmatic politician (in the parlance of the time, a politique), he promulgated the Edict of Nantes (1598), which guaranteed religious liberties to Protestants, thereby effectively ending the French Wars of Religion." [Wikipedia]