After the Peace of Basel (5 March 1795) Scharnhorst returned to Hanover. He had by now become so well known to the armies of the various allied states that he received invitations from several of them to transfer his services. This in the end led to his engaging himself to King Frederick William III of Prussia, who gave him a patent of nobility, the rank of lieutenant-colonel and more than twice the pay that he had received in Hanover (1801). The Prussian Military Academy employed him, almost as a matter of course, in important instructional work (Clausewitz was one of his students) and he founded the Berlin Military Society. In the mobilizations and precautionary measures that marked the years 1804 and 1805, and in the war of 1806 that ensued, Scharnhorst served as chief of the general staff (lieutenant-quartermaster) of the Duke of Brunswick, received a slight wound at Auerstedt (14 October 1806) and distinguished himself by his stern resolution during the retreat of the Prussian army. He attached himself to Blücher in the last stages of the disastrous campaign, went into captivity with him at the capitulation of Ratekau (7 November 1806), and, quickly exchanged, had a prominent and almost decisive part in leading L'Estocq's Prussian corps, which served with the Russians. For his services at Eylau (February 1807) he received the highest Prussian military order "Pour le Mérite".