Jesus nahm zu sich die Zwölfe, BWV 22 Weimar did not dismiss him and arrested him for disobedience. He was released on 2 December 1717. In Köthen, Bach found an employer who was an enthusiastic musician himself. The court was Calvinist, therefore Bach's work from this period was mostly secular, including the orchestral suites, the cello suites, the sonatas and partitas for solo violin, and the "Brandenburg Concertos". He composed secular cantatas for the court for occasions such as New Year's Day and the prince's birthday, including . He later parodied some of them as church cantatas without major changes, for example . Bach composed his cantata as
Brandenburg-Prussia broke out, with Brandenburg-Prussia involved as an ally of the Dutch Republic. This alliance was based on a treaty of 1669, and resulted in French occupation of Brandenburg-Prussian Cleves. In June 1673, Frederick William abandoned the Dutch alliance and concluded a subsidy treaty with France, who in return withdrew from Cleves. When the Holy Roman Empire declared war on France, a so-called "Reichskrieg", Brandenburg-Prussia again changed sides and joined the imperial forces. France pressured her ally Sweden to relieve her by attacking Brandenburg-Prussia from the north. Charles XI of Sweden, dependent on French subsidies, reluctantly occupied the Brandenburgian Uckermark in