Before his election, Ghislieri had risen through the Dominican order and then the Roman Inquisition, becoming its Grand Inquisitor in 1558 and earning, even among contemporaries who admired his personal austerity, a reputation for severity that followed him into the papacy. As pope he continued to treat doctrinal and political uniformity as inseparable concerns.
In 1570 he issued the bull Regnans in Excelsis, excommunicating Elizabeth I of England, declaring her deposed as a heretic, and releasing her subjects from any obligation of allegiance, a step that hardened rather than improved the position of England's Catholics, who now faced suspicion of disloyalty to the crown on top of religious persecution. His most celebrated achievement came against a different adversary.
Alarmed at Ottoman naval expansion in the Mediterranean, Pius assembled the Holy League, an alliance of Spain, Venice and the Papal States among others, whose combined fleet met and destroyed the main Ottoman fleet at the Battle of Lepanto in October 1571, a victory widely regarded at the time as having checked Ottoman naval power in the western Mediterranean for a generation. Pius attributed the outcome to the intercession of the Virgin Mary, invoked through the rosary devotions he had ordered said across Catholic Europe as the fleets engaged, and instituted a feast, Our Lady of Victory, later folded into the feast of the Holy Rosary, to commemorate it. He died the following year and was canonized in 1712, one of relatively few popes to be recognized as a saint.