The composer is Melchior Teschner (1584-1635) and the melody together with the text with which it continues to be associated first appeared in print in Leipzig in 1614. The title of the work in which it is contained is: “Ein andächtiges Gebet, damit die Evangelische Bürgerschafft zu Frawenstadt Anno 1613 den Herrn erweichet hat” [“A Reverent Prayer with which the Evangelical Citizens of Frauenstadt Moved the Lord in the Year 1613.”]

Here is the melody from Teschner’s original 5-pt. setting (1613):

The NBA has given a composite representation of the melody as it may have appeared in various hymnals during the 17th century:

The text is by Valerius Herberger (1562-1627) He was born in Fraustadt, began as a teacher, but then took on a position as a pastor at St Mary’s in Fraustadt. When this church was forcibly overtaken by Catholic Poles during the Counter-Reformation, he built a provisional, ‘emergency’ church called “Das Kripplein Christi” [“Christ’s Little Crib.”] He was severely tested by the events of the Counter-Reformation and suffered from the ravages of war.