Rēzekne (ˈrɛːzekne, Rēzne rjæːzjnjæ or Rēzekne ˈrjæːzjækjnjæ, German: Rositten, Polish: Rzeżyca) is a state city in the Rēzekne River valley in Latgale region of eastern Latvia. It is called The Heart of Latgale (Latvian Latgales sirds, Latgalian Latgolys sirds). Built on seven hills, Rēzekne is situated east of Riga, and west of the Latvian-Russian border, at the intersection of the Moscow – Ventspils railway and Warsaw – Saint Petersburg Railways. It is the 7th largest city in Latvia.
The Latgalian name of the city is Rēzne ( rjæːzjnjæ) or Rēzekne (ˈrjæːzjækjnjæ). Historically in German sources the location has been known as Rositten. Under the Russian Empire the city was named Rezhitsa (Рѣжица, Rzeżyca, רעזשיצע), but since Soviet period known as Резекне (ˈrjɛzjɛknjɛ).
A Latgalian hill fort is known to have existed at Rēzekne from the 9th to the 13th centuries, until its destruction at the hands of German crusaders of the Livonian Order. In 1285, the knights built a stone fortress on the site, which is today known as Rēzekne castle ruins, to serve as a border post on their eastern frontier.
The name Rēzekne was first documented in 1285. Throughout its early history, Rēzekne was attacked many times by Russian and Lithuanian forces. The town became part of the Polish–Lithuanian Commonwealth after the Peace of Jam Zapolski in 1582 during the Livonian War. Rēzekne received Magdeburg rights from Poland in the 17th century, but fell to the Russian Empire during the Partitions of Poland. In 1773, Rēzekne received city rights. Known as "Rezhitsa" during Russian rule, it was an uyezd center first in Pskov Governorate between 1772 and 1776, then Polotsk between 1776 and 1796, Belarus between 1796 and 1802 and finally in Vitebsk Governorate between 1802 and 1917.
During the 19th century, the construction of the Moscow-Ventspils and Saint Petersburg-Warsaw railways transformed Rēzekne from a sleepy country town into an important city with two stations.
In the spring of 1917, the first Latgalian congress was held in Rēzekne, in which Latgale was declared to unite with the other Latvian regions.