text: Saxony and Russia, both of which had been Austria's allies in the Seven Years' War, were now allied with Prussia. Although Frederick was weary of war in his old age, he was determined not to allow Austrian dominance in German affairs. Frederick and Prince Henry marched the Prussian army into Bohemia to confront Joseph's army, but the two forces ultimately descended into a stalemate, largely living off the land and skirmishing. Frederick's longtime rival Maria Theresa, who was Joseph's mother and his co-ruler, did not want a new war with Prussia, and secretly sent messengers to Frederick to discuss peace negotiations. Finally, Catherine II of Russia threatened to enter the war on Frederick's side if peace was not negotiated, and Joseph reluctantly dropped his claim to Bavaria. When Joseph tried the scheme again in 1784, Frederick created the  (League of Princes), allowing himself to be seen as a defender of German liberties. To stop Joseph II's attempts to acquire Bavaria, Frederick enlisted the help of the Electors of Hanover and Saxony along with several other minor German princes. Perhaps even more significantly, Frederick benefited from the defection of the senior prelate of the German Church, the Archbishop of Mainz, who was also the arch-chancellor of the Holy Roman Empire, which further strengthened Frederick and Prussia's standing amid the German states.
  Policies
  Administrative modernisation
  In his earliest published work, the Anti-Machiavel, and his later  (Political Testament), Frederick wrote that the sovereign was the first servant of the state. Frederick helped transform Prussia from a European backwater to an economically strong and politically reformed state. He protected his industries with high tariffs and minimal restrictions on domestic trade. He increased the freedom of speech in press and literature, abolished most uses of judicial torture, and limited which crimes could be punished by death. Working with his Grand Chancellor Samuel von Cocceji, he reformed the judicial system and made it more efficient, and he moved the courts toward greater legal equality of all citizens by removing special courts for special social classes. The reform was completed after Frederick's death, resulting in the Prussian Law Code of 1794, which balanced absolutism with human rights and corporate privilege with equality before the law. Reception to the law code was mixed as it was often viewed as contradictory.