Pope Gregory XIII (; ; 7 January 1502 – 10 April 1585), born Ugo Boncompagni, was head of the Catholic Church and ruler of the Papal States from 13 May 1572 to his death in April 1585. He is best known for commissioning and being the namesake for the Gregorian calendar, which remains the internationally accepted civil calendar to this day. Early biography Youth Ugo Boncompagni was born the son of Cristoforo Boncompagni (10 July 1470 – 1546) and of his wife Angela Marescalchi in Bologna, where he studied law and graduated in 1530. He later taught jurisprudence for some years, and his students included notable figures such as Cardinals Alexander Farnese, Reginald Pole and Charles Borromeo. He had an illegitimate son after an affair with Maddalena Fulchini, Giacomo Boncompagni, but before he took holy orders, making him the last Pope to have left issue. Career before papacy At the age of 36 he was summoned to Rome by Pope Paul III (1534–1549), under whom he held successive appointments as first judge of the capital, abbreviator, and vice-chancellor of the Campagna e Marittima. Pope Paul IV (1555–1559) attached him as datarius to the suite of Cardinal Carlo Carafa. Pope Pius IV (1559–1565) made him Cardinal-Priest of San Sisto Vecchio and sent him to the Council of Trent. In the year 1552 Ugo Boncompagni confirmed the paternity of son Giacomo (or Jacopo). As stated in the online Archivio Digitale Boncompagni Ludovisi: "One of the most valuable items to emerge from the new archival finds from the Villa Aurora is an autograph declaration in Latin and Italian dated 22 December 1552 by Ugo Boncompagni (1502-1585, from 1572 Pope Gregory XIII). Here Ugo confirms his paternity of Giacomo (or Jacopo) Boncompagni (1548-1612) by Maddalena de’ Fucchinis, a servant in the employ of his sister-in-law Laura Ferro. The future Pope explains in detail the circumstances of the boy’s conception, which took place in 1547 in Bologna, after the Council of Trent had moved to that city; his motive was to assure his inheritance rights following the death (in 1546) of his father Cristoforo Boncompagni. " He also served as a legate to Philip II of Spain (1556–1598), being sent by the Pope to investigate the Cardinal of Toledo. He formed a lasting and close relationship with the Spanish King, which aided his foreign policy aims as Pope. Election as pope Upon the death of