Cesis (tsāˈsēs, –zēz) [key], Ger. Wenden, town, central Latvia, on the Gauja River. It is a rail terminus, an agricultural market town, and a popular summer resort. Founded in 1209, Cesis was the seat of the Livonian Knights and became a member of the Hanseatic League. In 1561 it passed to Poland-Lithuania. Attacked by the forces of Ivan the Terrible in 1577, the fortress was blown up by its own garrison. Cesis was transferred to Sweden in 1629, to Russia in 1721, and to newly independent Latvia in 1918. It was the site in 1919 of a Latvian victory over a German free corps. The name of the town also occurs as Tsesis and Zehsis.