The first written mention of Kosmonosy is from 1186, when Duke
Frederick donated the village to the order of
Knights Hospitaller. They had built here the Church of Saint Martin. The church and partly the village were destroyed during the
Hussite Wars. In 1607, during the rule of Jiří of Hohenlohe, Kosmonosy became the centre of a large estate. From 1650 to 1739, the estate was owned by the
Czernin family and prospered. They had built here several buildings, including the church and the
Piarist monastery and college. From 1730, the Czernins sold off their property due to debt. The local
gymnasium, run by the monastery, became a centre of education in the region. However, in 1784 it was moved to Mladá Boleslav. A textile factory was built here in 1763 and the town became known for the textile industry, but the manufacture was moved to
Josefův Důl in 1847. The monastery was abolished in 1784, but in 1867, the psychiatric hospital was established in its premises. Kosmonosy was promoted to a
market town in 1868 and to a town in 1913. ==Demographics==