Fugue in G minor, BWV 131a

The Fugue in G minor, BWV 131a, is a piece of organ music attributed to Johann Sebastian Bach. It is a transcription of the last movement of his cantata , BWV 131. The cantata is definitely by Bach, while the arrangement for organ is regarded by some authorities (from Spitta onwards) as spurious. The organ version likely originated after the cantata, which was composed in 1707.
Publication.
The piece was published in 1891 in the Bach-Gesellschaft Ausgabe, the first complete edition of the composer's works. It was edited by Ernst Naumann.
Relationship with the cantata.
The key of G minor, sometimes associated with sadness, is used extensively in the cantata, which sets Psalm 130, one of the penitential psalms.
Scoring of the cantata.
In the cantata the fugue (a permutation fugue) is sung by the choir. The score of the cantata does not feature an organ part as such. However, the scoring for the instrumental ensemble includes a basso continuo part (for which a figured bass is provided), and Bach may well have intended this to be played on the organ. Ton Koopman, for example, in his recording of this cantata uses organ continuo.