The first 18 months of the war ruthlessly exposed the military deficiencies of both Russia and Austria-Hungary. Russia had initiated the war with bravado, two armies immediately invading East Prussia, but a brilliant German counteroffensive saw both armies routed at a cost of some 200,000 casualties. However, the Austro-Hungarian attempt to capitalize on Russian disarray by a march on Warsaw ended in headlong retreat and massive casualties. After further reverses from the Austrians over the ensuing winter, the Germans took command of the front and in May 1915 punctured and shattered the Russian southern defences. Moving northward, Warsaw was captured and a separate offensive pushed on to the borders of Latvia, capturing the Russian strongholds of Brest-Litovsk and Novo-Georgievsk. By September the whole of Poland, Lithuania and Latvia were in the hands of the Allies at a cost of some 2 million Russian casualties.