This article provides an overview of the career of Andreas Sandhagen, a 17th century pastor in Tallinn, and examines his work and attitudes as a cleric. He came from a well-known clerical family in Northern Germany, members of which worked as pastors in Nordhausen, Rostock, Luneburg, and elsewhere. Andreas was born in 1612 in the town of Nordhausen in Thuringia, the son of Johannes Sandhagen, pastor of the Church of St. Blasius. He enrolled at Leipzig University in 1623, and thereafter at Greifswald (1634) and Konigsberg (1637) universities. Like many other intellectuals from Germany who ended up in Estonia during the 30 Years War, Sandhagen arrived in Tartu in the late 1630's: he was enrolled at the Academia Gustaviana (Tartu) in 1638, was the secretary of Academia in 1639-1642, and professor of history and ethics in 1643-1645. In 1645 he accepted a position as deacon of Tallinn's Church of St Olaf upon the invitation of Tallinn's town council. He died in 1657 in the plague epidemic that gripped Tallinn. Sandhagen was the only pastor in Tallinn known to us who was tolerant towards the "new prophethood" that had spread in Northern Germany, particularly during the 30 Years War, and extended into Scandinavia and the Baltic provinces. These prophets allegedly received visions from angels sent by God visions that commanded secular rulers, including the town councils of cities, to appeal to transgressors to repent and do penance. The visions threatened towns and other communities with God's punishment famine, plague, war or other forms of destruction. The Lutheran church tolerated those prophets to the extent that their declarations were in harmony with orthodox Lutheran dogma and the Bible. The visions induced numerous theological disputes and printed polemical tracts. There were both defenders of the prophets and their opponents among theologians. One of the heralds of prophethood in Estonia, Laurentius Matthaei, mostly disseminated the published visions of Georg Reichard, a prophet from the Dresden area. Matthaei's activities in Tallinn in 1645 led to a conflict between Sandhagen, who had publicly come to the defence of visions, and other clerics in the city. It was not until 1651 that Sandhagen's contacts with the cleric Jacob Fabricius from Stettin, the author of one of the better-known anti-visions tracts, came to light in Tallinn. Fabricius allegedly published Sandhagen's views regarding prophets. By the beginning of the 1650's, discussions concerning "visionism" were for the most part already abating everywhere, just as the activity of the prophets themselves was fading away after the end of the 30 Years War. Under these circumstances, Sandhagen's positive attitude towards "visionism" was probably no longer that important in Tallinn anymore. There is reason to suggest that he was associated with the Rosicrucian movement (one of the numerous mystical movements of the 17th century aimed at reforming religion and life), although no direct references to his association with it are found in the sources. Rosicrucian ideas spread in some circles at the Academia Gustaviana in the latter half of the 1630's and Sandhagen could have come into contact with them during his Tartu period. Some evidence suggests that Sandhagen shared common views with Valentin Weigel, one of the most prominent sources of inspiration for Rosicrucians. One of Sandhagen's surviving letters to Georg Calixtus, professor of theology at Helmstedt, from whose views the so called syncretistic orientation of Lutheranism developed in favour of drawing Christian confessions together, supports the claim that Sandhagen's attitude towards syncretism was favourable. The evidence thus suggests that Sandhagen was critical towards mainstream orthodox Lutheranism. Regardless of the fact that Sandhagen was accused of deviating from the church's "pure" doctrine, his respected position in the city and the fact that he retained his position as pastor demonstrates that Lutheranism in Tallinn, which is for the most part depicted as being rigid and homogeneous, in real life allowed more room for thought and expression regarding confessional doctrine than official standards permitted.