Prussia withdrew from the First Coalition in the Peace of Basel (1795), ceding the Rhenish territories to France. Upon Frederick William II's death in 1797, the state was bankrupt and the army outdated. He was succeeded by his son, Frederick William III (1797–1840), who involved Prussia in the disastrous Fourth Coalition. The Prussian Army was decisively defeated in the battles of Saalfeld, Jena and Auerstedt in 1806 and Napoleon occupied Berlin. The Prussians' famed discipline collapsed and led to widescale surrendering among infantry, cavalry and garrisons. While some Prussian commanders acquitted themselves well, such as L'Estocq at Eylau, Gneisenau at Kolberg, and Blücher at Lübeck, they were not enough to reverse the defeats of Jena-Auerstedt. Prussia submitted to major territorial losses, a standing army of only 42,000 men, and an alliance with France in the Treaty of Tilsit (1807).