In 1856, Leopold II, Grand Duke of Tuscany established a penal colony in Pianosa because it was considered a perfect place to isolate, segregate, and oversee detainees; at the proclamation of the Kingdom of Italy in 1861, there were 149 prisoners on the island. In 1864 a structure able to contain 350 prisoners was built, but in 1872 the island was divided into numerous farms organizing the inmates as small communities; in 1880 there were 960 detainees. The captives cultivated cereals, produced oil and wine as Sangiovese and Procanico, there were poultry, pigs, and cattle farms. From 1884 until 1965, because of its dry climate, Pianosa hosted convicts from all over Italy who had been affected by tuberculosis. At the beginning of the 1900s, the population on the island was 21 civilians, 80 Polizia Penitenziaria, 40 soldiers, and 800 prisoners. The former President of the Republic of Italy Sandro Pertini became an inmate in 1932 for political reasons. During World War II, on 17 September 1943, Germans troops invaded Pianosa and occupied it; on 19 March 1944 French commandos landed on the island, and after a short firefight left again, taking away 40 prison guards as hostages; the following month an allied bomber attacked the island, killing six people.. How many years did Pianosa host convicts?