He was a Lutheran minister and a schoolteacher who, due to contacts with early pietist literature, came to be tormented by religious doubt, guilt, and general anxiety. He first caused a stir in the beginning of the 1680s by blowing up his philosophical works in Oulu with gunpowder. He also renounced his priesthood in the Lutheran church and his schoolteacher job. He then fell ill, and for about two years he neither washed himself nor had his hair or beard cut. In his agony, he turned to the local vicar, asking for public absolution for his sins. The vicar explained to him that such scruples were merely the work of the devil and he should not pay attention to them. On 22 July 1688 Ulstadius appeared in the Dome of Turku in his rags, with his hair hanging long and with a huge matted beard, interrupting the service by starting to read aloud the radical theses he had written down. He proclaimed that the Lutheran doctrine was doomed, that prayer books and postils were a bunch of lies, and that the ministers were not endowed with the Holy Spirit. When two men grabbed him to throw him out of the Dome, what was left of his humble dress fell off and Ulstadius ran down the main aisle of the church, naked and screaming that the disgrace of Finnish clergymen would be revealed, like his current disgrace. Ulstadius and two of his most impassioned followers were sentenced to death, but the conviction was changed to life in prison. Ulstadius was then sent to the infamous prison Smedjegården in Stockholm, capital of the Swedish Empire, where he remained for the rest of his life, under very hard conditions. During his last years, when he was an old man, he was offered freedom, but when he learned that his freedom was only a pardon, not a change of the original conviction, he said that he didn't want such a freedom, and asked to stay in the prison. He stayed in prison, and they gave him better conditions, so that he was able to hold meetings and prayers in his prison cell, together with the people of the growing radical-pietistic movement in Stockholm. Ulstadius died in 1732; he had then been in prison for 44 years, and was remembered long after, both in Finland and Sweden, as a forerunner for the pietist revival and for free revivals in general.