The Chorale Prelude BWV 720 'Ein feste Burg ist unser Gott' (A mighty fortress is our God), was written by Johann Sebastian Bach, based on the homonym hymn melody. He had used the hymn before to write Ein feste Burg ist unser Gott (BWV 80), twice in his Choralgesänge (Choral Hymns), BWV 302 and BWV 303. He also used fragments of the melody in the Weihnachtsoratorium (Christmas Oratorio). The original text is one of the best known of Martin Luther's hymns. Luther wrote the words and composed the melody sometime between 1527 and 1529, paraphrasing the text of Psalm XLVI.