Wo Gott der Herr nicht bei uns hält, BWV 1128

Wo Gott der Herr nicht bei uns hält is a chorale fantasia for organ composed by Johann Sebastian Bach in the early 18th century, likely between 1705 and 1710. The Zahn 4441a hymn tune for Justus Jonas's 1524 hymn "Wo Gott der Herr nicht bei uns hält", a paraphrase of Psalm 124 ("If it had not been the Lord who was on our side ..."), is the basis of the composition.

A copy of the chorale fantasia resurfaced on 15 March 2008 at an auction of items from the collection of the 19th-century Bach scholar Wilhelm Rust. The piece, until then known as, could by this discovery be authenticated as Bach's and was reassigned the number BWV 1128.

Context
In the late 17th century, when he was not yet 15, Bach was already acquainted with the chorale fantasia genre, by such settings as Buxtehude's Nun freut euch, lieben Christen g'mein, BuxWV 210, and Reincken's An Wasserflüssen Babylon. Apart from Wo Gott der Herr nicht bei uns hält, there is only one other known chorale fantasia for organ by Bach: Christ lag in Todesbanden, BWV 718, which was composed before c. 1715. From mid 1707 Bach was organist at the Divi Blasii church in Mühlhausen. Before that time he had been working in Arnstadt, where he played the Wender organ of the Neue Kirche. After he moved to Weimar in mid 1708, he revisited Mühlhausen several times in the next few years, for instance supervising the remodelling of the organ of the Divi Blasii according to his design, which was completed in 1709, and performing cantatas he composed for council election in 1709 and 1710 (BWV 1138.1 and 1138.2).

Time of origin
Stylistic analysis, conducted by, among others, Jean-Claude Zehnder, indicates that Bach composed Wo Gott der Herr nicht bei uns hält between c. 1705 and c. 1710, or, more narrowly, in the c. 1707–1708 period. From what is known about the organs played by Bach around that time, the organ of the Divi Blasii, after completion of the changes initiated by Bach, appears to be the best fit for the composition's performance specifications and range, although it is assumed that Bach composed all his organ music so that it could be performed on more than one specific instrument.

Hymn
Justus Jonas's paraphrase of Psalm 124, "Wo Gott der Herr nicht bei uns hält", was first published in the Erfurt Enchiridion (1524). The hymn consists of eight stanzas of seven lines. Its first stanza reads:According to Stephan Blaut it is primarily the content of this first stanza which is illustrated by Bach's organ setting. Several hymn tunes were composed for Jonas's hymn. Bach's chorale fantasia is based on a setting of the hymn in bar form, first published in Wittenberg by Joseph Klug, in the second quarter of the 16th century (Zahn No. 4441a).

Chorale fantasia genre
In the chorale fantasia for organ, a genre as apparent in the 17th-century north German models by Buxtehude and Reincken which Bach knew, the melody of each line of a hymn stanza is treated separately: the treatment consisting of applying diverse techniques, such as echo, countermelodies and other embellishments or variations, to such fragments of the hymn tune, until all phrases of the chorale melody are treated consecutively. Sections in which the phrases of the hymn tune are treated can be connected with transitional passages, for instance in the form of a coda. This is different from a chorale fantasia type of movement in a vocal composition, where the phrases of the chorale melody are usually sung as a cantus firmus, against a backdrop of vocal and instrumental accompaniment and harmonisation, which usually also exhibits independent musical material, often in interludia between the phrases of the hymn. An example of such vocal chorale fantasia by Bach on the "Wo Gott der Herr nicht bei uns hält" hymn, also using the Zahn 4441a melody, is the opening chorus of his chorale cantata named after the hymn, Wo Gott der Herr nicht bei uns hält, BWV 178, composed in the 1720s.

Music
Bach's composition consisting of 85 bars of organ music is based on the Wittenberg melody used for Jonas's hymn. The large-scale fantasia is of moderate difficulty in four contrapuntal voices, and is scored for Rückpositiv, Oberwerk and Pedal.

After an introductory section, the ornamented chorale appears in the right hand beginning with bar 12, proceeding verse by verse with interludes, chromaticism and echo sections. It concludes with a coda in a flurry typical of stylus phantasticus.

Manuscripts
The first public record of the composition is in the 1845 estate auction of Johann Nicolaus Julius Kötschau who had been organist at St. Mary's in Halle. According to the auction record the manuscript was once owned by Wilhelm Friedemann Bach, Johann Sebastian's eldest son, and predecessor of Kötschau as organist in Halle. When Wilhelm Friedemann died in 1784 he left it along with other manuscripts, which included his Clavier-Büchlein, to his distant relative and student Johann Christian. When this Johann Christian died in 1814, Kötschau acquired these pieces from the estate auction. Kötschau later loaned the manuscript to Felix Mendelssohn, and then to the Leipzig publisher C. F. Peters.

In the 1845 auction of Kötschau's estate, the manuscript, along with other Bach works, was acquired by. In 1852, to preserve his collection, Gotthold donated it to the Königsberg Library, where, 25 years later, Joseph Müller listed it in a catalogue describing "24 books of organ compositions by J. S. Bach," which contained as fascicle No. 5 "Fantasia Sopra il Corale Wo Gott der Herr nicht bey uns hält pro Organo à 2 Clav. e Pedale."

Learning about the piece, Wilhelm Rust had the manuscript sent on a library loan to Berlin, where he copied it in 1877. Rust, who had edited more than half of the volumes of the Bach Gesamtausgabe (BGA), resigned from the BGA project over conflicts, particularly with Philipp Spitta. Rust shared his knowledge about the piece with Spitta's rival Bach biographer Carl Hermann Bitter, who listed "141. Wo Gott der Herr nicht bei uns hält. Fantasia sopra il Chorale. G-moll. (Königsberger Bibliothek.)" as a chorale prelude by Bach in Vol. IV of his second edition of J. S. Bach (Dresden 1880 / Berlin 1881). After Rust's death in 1892, a large part of his collection went to a student of his, Erich Prieger. Prieger's collection, in turn, was put up for auction after World War I in three sections, one of which, with 18th- and 19th-century Bachiana, went in 1924 to the Cologne book dealer M. Lempertz.

The manuscript owned by Kötschau went lost in the Second World War. According to Hans-Joachim Schulze there is some hope it may have survived in a Russian library. As the chorale fantasia did not get included in the BGA, Wolfgang Schmieder listed it as a doubtful work in the second Appendix (Anhang) of the 1950 first edition of the Bach-Werke-Verzeichnis (BWV Anh. II 71), where it remained in subsequent versions of the catalogue that were printed in the 20th century.

Parts of Prieger's collection, including some compositions by Rust and his copy of BWV Anh. II 71, went up for auction on 15 March 2008. The Rust items were acquired by the University and State Library of Halle, and finally the chorale fantasia was authenticated by Stephan Blaut and Michael Pacholke of Halle University, and got the BWV number 1128.

Publication
On 10 June 2008 Ortus published the score, based on two 19th-century manuscript sources:
 * Source A: Rust's copy of 8 September 1877
 * Source B: a copy made by Ernst Naumann sometime after 1890, kept in the Bach-Archiv Leipzig.

Performance and recording
On 13 June 2008, Ullrich Böhme played BWV 1128 at the opening concert of the Bachfest Leipzig, which included Bach's cantata BWV 178 on the same chorale, sung by the Thomanerchor. The same day a CD by Rondeau Production containing these two works was released.