Liepaja or Liepaya (both: lēĕˈpäyä) [key], Ger. Libau, city (2011 provisional pop. 76,570), W Latvia. An ice-free port on the Baltic Sea, it is located at the end of an isthmus separating the Baltic from Lake Liepaja. The city has a naval base as well as a commercial harbor. Liepaja is second only to Riga in size and industrial development among Latvian cities. Metallurgy is the leading industry; others include shipbuilding, food and fish processing, and sugar refining. Founded by the Teutonic Knights in 1263, the city was part of Livonia and later of the duchy of Courland, with which it passed to Russia in 1795. In the late 19th and early 20th cent. Liepaja acquired great commercial importance and became one of the main Russian emigration ports with a direct shipping line to the United States. The city was under German occupation during most of World War I. It was briefly the site of the provisional Latvian government when Bolshevik forces attacked Riga in 1918. Held by the Germans from 1941–45, Liepaja suffered heavy damage. After World War II it was annexed by the USSR along with the rest of Latvia. City landmarks include a residence of Peter the Great and the 18th-century Church of the Trinity. It is also spelled Liepaya.