In 1717, 32-year-old J.S. Bach signed a contract with Leopold, Prince of Anhalt-Köthen, engaging him as music director and composer for the court of Köthen, and promptly found himself thrown in jail. His current employer, Duke William Ernest of Saxe-Weimar, took umbrage with Bach’s failure to properly request leave from his post as first violin in Weimar — but the duke had unjustly denied Bach the position of Kapellmeister that Prince Leopold was now offering, and the composer was determined to leave, even if it meant showing some impertinence.
The worldly Leopold, a musician himself, soon became the godfather to one of Bach’s children and even a friend, as far as social conventions would allow. He provided Bach not only with a relatively comfortable salary, almost twice what he had in Weimar, but also — in a Calvinist court with a more sober approach to sacred music than its Lutheran counterparts — the rare opportunity to write different kinds of instrumental works for high-level performers.