Historical and old photos of Daugavpils (Dünaburg, Borisoglebsk, Dvinsk)
The town's history began in 1275 when the Livonian Order built Dünaburg Castle 20 km (12 mi) up the Daugava river from where Daugavpils is now situated. In 1561 it became part of the Grand Duchy of Lithuania and, subsequently, of the Polish–Lithuanian Commonwealth in 1569 (see Duchy of Livonia). In 1621 Daugavpils became the capital of the newly formed Inflanty Voivodeship, which existed until the First Partition of Poland (1772). In 1577 the Russian tsar Ivan the Terrible captured and destroyed Dünaburg castle. That same year, a new castle was built 20 km (12 mi) downriver. In 1582 Daugavpils was granted Magdeburg town rights. In the 17th century, during the Russo–Swedish War initiated by Tsar Alexis of Russia, the Russians captured Daugavpils, renamed the town Borisoglebsk and controlled the region for 11 years, between 1656 and 1667. Russia returned the area to Polish–Lithuanian Commonwealth following the Treaty of Andrusovo (1667). It became part of the Russian Empire after First Partition of Poland in 1772. It was an uyezd center firstly in Pskov Governorate between 1772 and 1776, Polotsk one between 1776 and 1796, Belarus one between 1796 and 1802 and finally Vitebsk between 1802 and 1917 as Dinaburg firstly, as Dvinsk later during Russian rule.
From 1784 onwards the city had a large and active Jewish population among them a number of prominent figures. According to the Russian census of 1897, out of a total population of 69,700, Jews numbered 32,400 (ca. 44% percent).
As part of the Russian Empire the city was called Dvinsk from 1893 to 1920. The newly independent Latvian state renamed it Daugavpils in 1920. Latvians, Poles and Soviet troops fought the Battle of Daugavpils in the area from 1919 to 1920. Daugavpils and the whole of Latvia was under the Soviet Union rule between 1940–41 and 1944–1991, while Germany occupied it between 1941 and 1944. The Nazis established the Daugavpils Ghetto where the town's Jews were forced to live. Most were murdered. During the Cold War the Lociki air-base operated 12 km (7 mi) northeast of Daugavpils itself. In the late Soviet era there was a proposal to build a hydroelectric power station on the Daugava river that was successfully opposed by the nascent environmental movement in Latvia.
On 16 April 2010 an assassin shot vice-mayor Grigorijs Ņemcovs in the center of the city. He died almost immediately and the crime remains unsolved.