The Prelude (Toccata) and Fugue in E major, BWV 566 is a work for organ written by Johann Sebastian Bach in 1708. It is an eartly work, comprising four sections and greatly resembling the Preludes and Fugues of Dietrich Buxtehude. Bach wrote a version of the piece in C major, nowadays known as BWV 566a, in order to be able to play it on meantone organs, where E major would sound discordant.