First Riga offensive
First Riga offensive was a military operation of the German Imperial Army with to divert Russian forces from the direction of the main blow of the summer offensive on Narew River. The Germans broke through the heavily fortified defenses of the Russian army and defeated the vastly superior enemy forces. However, no decisive success was achieved, and at the beginning of August the Russians launched a counteroffensive. Background

Battle
At 8 o'clock on July 14, after a powerful artillery preparation, the German 41st Infantry Division crossed the Venta River, without encountering resistance from the Russian units of the detachment of Lieutenant General Gleb Vannovsky, and advanced to Grivaishen. By 11 o'clock bridges for heavy artillery were built, and soon the German batteries opened fire from the left bank. At Papilė the 6th and 78th reserve divisions crossed the river. The Russian detachment of Major General Mikhail Grabbe and the 17th Infantry Division retreated practically without a fight. The commander of the 5th Army, Plehve, decided to inflict a flank attack on the advancing Germans, gathering a detachment from the 17th Infantry Division and the 1st Caucasian Rifle Brigade under the command of the commander of the 19th Army Corps, Lieutenant General Dmitri A. Dolgov, and on the rest of the front stretch the detachment of Grabbe. But the latter could not withstand the blow of the German infantry, and it took two days to regroup. In the end, Plehve agreed with the objections of Dolgov, who had a better idea of the emerging situation, and canceled the order to counterattack, but the units had already carried out the shift, and time was lost. To create an army reserve, the 2nd Cavalry Division and 13th Siberian Rifle Division had to be used. On July 15–16, the German Northern Corps captured the Russian troops in positions near Lielaucė. The 8th Cavalry Division joined the advance and threatened Mitava. The breakthrough reached 60 km along the front and from 6 to 30 km in depth. To eliminate the breakthrough, Plehve decided to send the 12th and 13th Siberian rifle divisions, giving them another 4th and 15th cavalry divisions with the Ussuri Cossack brigade, forming the 7th Siberian army corps under the temporary command of General Lieutenant N. Sulimov. On the basis of the Grabbe detachment, the brigade of the 73rd Infantry Division and the 19th Army Corps, a detachment of Dolgov was created to attack the right flank of the  Army of the Niemen. On July 17, the corps of Lieutenant General Curt von Morgen went on the offensive: the 1st reserve division and the infantry brigade of Colonel Otto von Homeyer, after two hours of artillery preparation, attacked Russian positions on both sides of the city of Schaulen. 1,779 heavy shells were fired at the Russian trenches, but the attack was repelled by units of the 38th Infantry Division. The failure also befell the 6th reserve division: during the offensive, it was subjected to enveloping attacks by the detachment of Dolgov and was driven back beyond the  Vindava River: Russian troops captured 500 prisoners and 7 machine guns. But the further advance of the Russian troops was repulsed by the fire of a battery of 15-cm howitzers. Despite the failure of the center of the  Army of the Niemen, the left wing continued to move forward. The 41st Infantry and 78th Reserve Divisions met the divisions of the 7th Siberian Army Corps, which had arrived on a forced march, and already at 10 o'clock they overturned them in the forest near Anperhof. 409 heavy shells were fired at the Russian positions, after which they were abandoned by the soldiers, who retreated to Mitava. On the left, the positions of the Siberian riflemen were bypassed by the 6th Cavalry Division, and the Life Hussar Brigade went to the flank and rear of Dolgov's detachment. The 8th cavalry division and the 18th cavalry brigade pushed back parts of the 4th and 15th Russian cavalry divisions and the Windau militia detachment. Since the beginning of the operation, the  Army of the Niemen captured 6,000 Russian prisoners and 9 guns. P. Plehve did not expect such a low combat capability of the 7th Siberian Army Corps and blamed N. Sulimov for the failure, although he himself exhausted the troops with marches in different directions. O. von Below did not take advantage of the weak cover of Mitava and made a different decision: to tie down the Russian forces with the 41st Infantry and 8th Cavalry Divisions, and send the rest of the formations of the Northern Group to the rear of the Russians. On July 18–19, the cavalry of the  Army of the Niemen attacked the Russian positions of the 15th Cavalry Division and the Ussuri Cossack Brigade: the Russian cavalry successfully repulsed the attacks, but retreated with the approach of the German infantry. After a series of unsuccessful attacks, C. von Morgen handed over the main blow to the brigade of Otto von Homeyer, transferring all the heavy artillery of the corps to him. To create a strike group, P. Plehve turned to M. Alekseyev for reinforcements and received the 53rd and 104th infantry divisions (the first from the 10th army, the second was transported from Odessa). To cover the gap of 50 km formed between the 7th Siberian and 19th Army Corps, Plehve assembled a detachment of Lieutenant General G. Troubetzkoy (2nd and 4th cavalry divisions, 37 guns). On July 20, the Southern Group of the  Army of the Niemen went on the offensive: the corps of C. von Morgen was supposed to capture Schaulen. Since the heavy artillery of the group was small, the preparation of the attack lasted 5 hours. Nevertheless, the battle formations of the Russian 3rd and 37th army corps were thrown back from the left bank of the Dubysa. P. Plehve was confident in the direction of the enemy's main attack on Mitava and did not attach importance to the success of the Southern Group. Corps C. von Morgen captured Shavli. Having allowed the troops of the left wing of the 5th Army to withdraw at 14 o'clock, P. Plehve tried to close the gaps in the battle line and defeat the German Northern Group on the outskirts of Mitava. But the stubborn battle did not lead to success. The Germans repulsed the counterattack and pushed back the right wing of the 5th Army. The retreat of D. Dolgov's detachment was cut off by E. von Schmettov's cavalry, but the next day he managed to break through. On July 22, O. von Below turned the 1st reserve corps of C. von Morgen from the city of Shavli to the southeast. Under these conditions, Plehve ordered the arriving 1st Cavalry and 53rd Infantry Divisions to hastily launch an offensive from Mitava, and the detachment of D. Dolgov, the 3rd and 37th Army Corps to withdraw. Thus, the 5th Army actually refused to cover Kovno from the north, concentrating on the defense of the routes to Riga and gradually getting out of the threat of double coverage. On July 23, a detachment of Major General V. Maidel (1st Cavalry and 53rd Infantry Divisions) from Mitava went on the offensive, bypassing the flank of the 41st German Infantry Division, but she stretched the front and entered into contact with the 8th Cavalry division. At Lindenfeld, the Maidel detachment had to attack the enemy positions in the forehead, there were no forces left to develop the first success. The detachment of D. Dolgov could not hold on to the planned line and retreated with a fight. With a night attack, the corps of C. von Morgen captured Šeduva, but the 1st reserve division was delayed in the city, and the Russian 3rd army corps took the opportunity to fortify. Under the onslaught of the Southern Group of the  Army of the Niemen, the 37th Army Corps retreated. The Bavarian and 3rd German cavalry divisions fought a stubborn battle with the cavalry detachment of N. Kaznakov (1st Guards and 5th Cavalry Divisions), who managed to stop the Germans and secure the left flank of the army, while retaining the right bank of the Nevėžis River. For 10 days, the German  Army of the Niemen captured 23 guns, 40 machine guns and 27,000 prisoners. The Russian 5th Army, although it avoided envelopment, forcing the enemy to move to a frontal pursuit, suffered heavy losses and absorbed the reserves of the front. The commander-in-chief of the armies of the North-Western Front, M. Alekseyev, was seriously concerned about the situation in the Riga and Dvina directions, and ordered, to facilitate the task of Viliya River to Janów 1st Kuban Cossack division with attached infantry. At the same time, P. von Hindenburg ordered the 10th Army to block Kovno more closely from the western side. On July 24, P. Plehve, trying to strengthen the positions of the 5th army, ordered the 3rd and 27th army corps, with support from the left by N. Kaznakov's detachment, to defend positions; detachments of D. Dolgov and G. Troubetzkoy were to advance against the left flank of the Southern group of Germans. The commander of the  Army of the Niemen, O. von Below, ordered the 5th Cavalry Corps with the brigade of  Otto von Homeyer to cover the 30-km gap between the detachment of Major General Eberhard Graf von Schmettow for the development of the offensive (near Mitava) and the rest of the Northern Corps, send the 6th and 78th reserve divisions across the Laventa River, bypassing Panevėžys from the north, with the 1st reserve corps to advance directly on Panevėžys along the railway, and the 36th reserve and The Bavarian cavalry divisions (13 battalions, 27 squadrons, 94 guns) bypass Panevėžys from the south, hiding from the Kovno garrison by the 3rd cavalry division. Both sides were exhausted from the fighting and maneuvering and needed to rest. Therefore, during the day the Germans conducted only a sluggish pursuit, taken by P. Plehve for the end of the offensive. E. von Falkenhayn demanded the immediate capture of Mitava, but for this in the von Schmettow's detachment did not have enough infantry and heavy artillery. All the efforts of the Army of the Niemen on July 25 were directed against the Russian positions near Panevėžys. The Bavarian cavalry division attacked the Russian 5th cavalry division, upset by the battle with the 36th reserve division, but it was able to retreat, where the entire detachment of N. Kaznakov gathered. Having thrown back the Russian cavalry from the left flank, the 36th reserve division went to the rear of the 37th army corps, connected from the front by a battle against von Beckmann's division, causing its disorderly retreat 45 km to the east, cutting off the escape routes and the 3rd army corps. The defeat of the left wing and center of the 5th Army was not used by the Germans, who acted very carefully and were more concerned about protecting themselves from possible counterattacks on an extended front. By July 26, the  Army of the Niemen occupied the line from the mouth of the Nevėžis River to the Baltic coast of Courland. The capture of Panevėžys by the German troops gave them the opportunity to develop an offensive in three directions: to the north against Riga, to the east to Dvinsk and Vilna, to the south around Kovno. The Supreme Commander of All German Forces in the East proceeded to implement the plan to capture the fortress of Kovno. However, the task of capturing Mitava was not removed: for this, the 8th cavalry, 41st infantry and 6th reserve divisions and 6 heavy batteries were included in the von Schmettov detachment. The 1st and 5th cavalry corps (M. von Richthofen and von Schmettov) were to advance  towards Dvinsk and Vilna, and the 1st and 39th (Northern) reserve corps were concentrated in Panevėžys to attack the northern front of the Kovno fortress. Between the fortresses of Kovno and Osowiec, the Russian and German 10th armies occupied defensive positions opposite each other, a total of 332,151 Russian and 167,710 German military personnel. The double advantage of the Russian side in forces and means put the success of the operation of the German troops against Kovno into question. Therefore, initially the German 10th Army (commanded by Colonel General Hermann von Eichhorn) was limited to small strikes, improving positions. On July 15, the German 77th Reserve Division northeast of Suwalki captured 300 prisoners; on July 21, the 79th reserve and 16th landwehr divisions, having spent 3,000 heavy shells, attacked the Russian positions. However, it was not possible to build on the first success due to the flood of the Neman River and the heavily fortified positions of the Russian troops on the right bank. The Landwehr advancing on Kovno was stopped by Russian troops 16 km from the forts. On July 23, the 10th German Army received the task of closely blocking the fortress from the west, and on July 24, they were to cross the Neman south of Kovno and cut off the garrison's escape route. But until July 27, the army received only one infantry brigade and 5 heavy batteries (including one 42-cm mortar), after which E. Ludendorff informed H. von Eichhorn that it was impossible to further strengthen his troops. Having no support against Kovno from the south, the commander of the Army of the Niemen O. von Below launched an offensive against Mitava. On July 26, the Russian cavalry, covering the retreat of the 5th Army, withdrew. On July 28-29, both sides brought incoming reinforcements into the battle line. By this time, the 5th Army had 205,477 men against 178,564 men in the Army of the Niemen. M. Alekseyev did not yet see a reason to worry about the fate of Riga and Vilno, rightly believing that the Germans did not have enough strength for this. However, at a meeting at Headquarters on July 28, the Quartermaster General of the staff of the Supreme Commander-in-Chief, General of Infantry Yuri Danilov, demanded "to abandon the desire to hold the line of the Vistula River at all costs and in their decisions ... to accept exclusively the requirements of the strategic situation, striving at the first opportunity to strengthen and consolidate our position in the Riga–Schaulen region, which is acquiring paramount importance. The Supreme Commander-in-Chief, Grand Duke Nikolai Nikolayevich, ordered that two infantry and a cavalry division from the armies of the Southwestern Front be transferred to the Vilna region to reinforce the 5th Army. On July 29-31, the German attack on Mitava began. The 6th reserve division captured Bauska and advanced 10 km east across the Aa River: the Homeyer brigade turned north, passing as far as Mežotne. The 8th Cavalry Division occupied Gross Eckau, and the 3rd Cavalry Brigade - Lazhap on the shores of the Gulf of Riga. The Germans captured 3,450 prisoners and 6 machine guns. The approach of the Russian reinforcements of the 19th and 3rd army corps to Panevėžys was parried by the offensive of the corps of von Richthofen, von Schmettov and von Morgen from Lėvuo River to Aleksandrovka: the cavalry was supported by a heavy battery. On August 1, Russian detachments on the Riga coast and the 7th Siberian Army Corps began to withdraw to Riga: units of the von Schmettow group that had gone on the attack occupied Mitava at 16 o'clock, in which wood depots were set on fire during the withdrawal, and by evening they were already halfway from Riga. Outcome 
After receiving the order from staff of the  Supreme Commander of All German Forces in the East to turn the army to Vilno, O. von Below ordered to stop the pursuit, go on the defensive in the Riga direction, leaving only the 29th Landwehr and the 3rd and 18th cavalry brigades near Riga, and send the infantry divisions to the south on Vilno. References

Conflicts in 1915
Battles of the Eastern Front (World War I)
Battles of World War I involving Russia
Battles of World War I involving Germany
1915 in the Russian Empire
1915 in Germany