Nephew and successor of Frederick the Great, Frederick William II came to the Prussian throne in 1786 and left much of the direction of the state to favourites drawn from the Rosicrucian circle, whose influence produced the religious edict of 1788 and a tightening of censorship. He joined Leopold II in the Declaration of Pillnitz in August 1791 and concluded a defensive alliance with Austria the following February. He pressed for an immediate invasion of France in 1792 against the caution of his commander, the Duke of Brunswick, and the advance was halted at Valmy in September. Preoccupied with securing his share of Poland in the partitions of 1793 and 1795, he prosecuted the French war half-heartedly and left the coalition by the Treaty of Basel in April 1795. He died in 1797.