Martin Luther began his studies in law and completed a master's of arts degree in 1505. Later that year, it is reported that when caught in a thunderstorm he prayed to St. Anne that if saved he would become a monk. A few weeks later he entered the Augustinian monastery at Erfurt. In a famed paper of late 1517, Luther denounced indulgences, papal venality, jurisdiction over purgatory, and the accumulation of merits of the saints.
He was examined the following year by Cardinal Cajetan and in 1519 debated Johann Eck, emerging as a national hero. In 1520, Luther issued three major tracts protesting the hierarchical-papal structure of the church and rejecting the canon law that served as its legal justification. Emperor Charles condemned Luther. Frederick the Wise hid Luther in Wartburg castle, where he translated the entire New Testament from Greek into German.