Lithuania and Poland at odds
The Panevėžys special battalion of the Lithuanian army crossed into modern-day Latvia in June 1919. On June 18 Lithuanian army units were seen near Aknīste. Partisans from northern Courland cooperated with the Lithuanian forces, as did Jūlijs Jansons, the head of the Eastern Front. On July 6–10 the Lithuanian forces and the partisans tried attacking Daugavpils for the first time. The Lithuanians were successful in taking Ilūkste but cancelled the attack on Daugavpils as they lacked ammo.
As the Lithuanian army settled down and fortified its political and territorial appetites grew accordingly. Lithuania now wanted control over Ilūkste and Daugavpils. They had to be quick to do that, however, as in late August the Poles were rapidly approaching Daugavpils from the south. On August 23 the Lithuanian headquarters ordered the 1st and 2nd brigades to attack Daugavpils from the southwest, crossing the Daugava river. But the Lithuanians were too late.
The first battles for Daugavpils
The Polish Army's 1st infantry legion was in late August able to defeat the 4th infantry division of the Red Army and cross into Latvia on August 27, taking the Turmanta station. A strong Polish battle group was prepared to attack Daugavpils on the night to August 31 but the Lithuanians were able to attack first, starting the attack on August 30. Soviet forces started backing up towards Grīva and the right bank of Daugava River. The Poles pursued them and arrived at Grīva at about the same time with the Lithuanian avant-garde, firing at the wooden and railroad bridges over the river.
The Red Army was spared complete defeat by the 2nd Latvian Riflemen Regiment, which had 1,424 soldiers and 22 machine guns. It had been hurriedly relocated to Daugavpils from the vicinity of Pskov. The riflemen executed a brazen attack against the Lithuanian and Polish units, taking 20 POWs and two machine guns. Their advance was so swift that it was able to also gain some territory but at the cost of 6 men being killed and 50 wounded.
On August 31 a new Polish advance on Grīva started but it was likewise repelled. Estonian Red Army units started arriving in Daugavpils as well, with a Soviet attack following on September 1. It did not bring much success though. The front became rather quiet until late September (fights were ongoing near Krāslava, however). The 2nd Latvian Riflemen Regiment had lost 13 men. A further 14 were missing and 141 wounded.
The battles of September 27–28
The Polish approached the second attempt on Daugavpils in a much more serious fashion. This time the Polish army had a full division, backed by heavy artillery, armored trains and even 20 French tanks (conducted by Poles and Frenchmen). They strove to take over the front positions of the Soviets and destroy the bridges over Daugava. The attack commenced September 27.
Furthermore, the Poles attacked the Lithuanian brigade stationed nearby, taking the commander prisoner. This they did to prevent Lithuanian involvement as relations had soured markedly in the meantime.
Even though Soviet forces had become markedly weaker (the 2nd Latvian Riflemen Regiment was moved to Belarus), in the September 27 attack the Poles were not successful in taking the front positions before the Grīva bridge. They were successful only the next day with the aid of twelve tanks. A tank unit then turned east to disperse the 5 km-wide bridgehead. The Soviets tried retreating over the river in boats, but the Polish tanks destroyed a great part of them. Meanwhile Polish sappers blew up the two bridges under the cover of French-made Renault tanks. This way the Poles had secured the further left flank of their front, cutting the length of their front line and prevented further Soviet attacks from Daugavpils.
In all, the Polish army lost 266 people in the two attacks. Several tank-men were wounded. The Lithuanians lost a couple dozen as well. The September 27–28 battles were not only the only ones with tank participation but also among the bloodiest in the Latvian Independence War.
After Grīva was taken, the front remained silent until early January 1920 when Latvia and Poland had struck a military treaty and the two armies took Latgale in a joint operation. Unlike Poland, which had no territorial claims against Latvia, Lithuania wanted Palanga, Mažeikiai and the Ilūkste region. In September 1920 there was even a skirmish near Subate where one Lithuanian fell and two were wounded.
An international arbitrage court settled the the Latvian–Lithuanian border question in March 1921.