After the defeat of Russia by Napoleon and the Treaty of Tilsit, he drew up, at the emperor’s request, a constitution that proposed popular participation in legislation; this was only partially implemented. He increased the burden of taxation on the nobility and sought to educate the bureaucracy, establishing promotion on the basis of merit. In doing so he incurred the enmity of both the aristocracy and the bureaucrats, and was charged (1812) with treason and secret dealings with the French, and sent into exile. Reinstated four years later, he rejoined the council of state (1821) and spent his final years codifying Russian law.