3 November 1806. The city became a base for continued military action, and Napoleon himself stayed there (at the former Jesuit College) between 27 November and 12 December. The following year Poznań became part of the semi-independent Duchy of Warsaw, and served as the capital of an administrative area called Poznań Department. In 1812 Napoleon's armies again passed through Poznań, this time in retreat following defeat in Russia, and Napoleon stayed in the city (in secret) on 12 December. The last French troops left on 12 February 1813, and Russian troops entered the city the same day, beginning an occupation which lasted until 1815. In that year, as agreed at the Congress of Vienna, Poznań and its region again came under Prussian control. In the Prussian Partition for the second time (1815–1918) In 1815 the official population of Poznań was 23,854. The city became the capital of the Grand Duchy of Posen, which in theory enjoyed limited autonomy, with the rights of the Poles respected, although in practice efforts at Germanization were undertaken. Poznań was the seat of the royal governor, Duke Antoni Henryk Radziwiłł. Urban development continued, including the marking out of more streets in the newer "upper town" and its integration with the old town, and demolition of the walls and gates of the old town (several churches were also demolished). Plans were also made for a new line of fortifications around the expanded city, including the Fort Winiary citadel in the north (now the Cytadela park). Construction work on this project began in 1828 and continued for several decades. (For details, see Festung Posen.) Military barracks and training grounds were created in the north of the city. Among projects financed by Poles in Poznań, the Raczyński Library, financed by Edward Raczyński, was completed in 1828. German poet Heinrich Heine was most impressed when he visited the site of the library's construction in August 1822, though Edward Raczyński, in fear of rejection, could not disclose to the Prussian authorities he intended to house a Polish public library there until February 1829, when he sent the Prussian king the statute of its foundation and organization and on 24 January 1830 Frederick William III of Prussia did approve it. After the death of the library's founder and then his son, Roger the Prussian authorities made effort to Germanize the Raczyński Library, but these efforts were not fully successful. An important