After the outbreak of the Polish–Bolshevik War, the German commanders of the Ober Ost feared that the city might fall to Soviet Russia, so on 27 April 1919 they passed authority to Poland. The city was taken over by the Polish Army the following day and Polish administration was established in the city. The city was lost to the Red Army on 20 July 1920 in what became known as the First Battle of Grodno. The city was also claimed by Lithuanian government, after it was agreed by the Soviet–Lithuanian Treaty of 1920 signed on 12 July 1920 in Moscow that the city would be transferred to Lithuania. However, Soviet defeat in the Battle of Warsaw made these plans obsolete, and Lithuanian authority was never established in the city. Instead, the Red Army organised its last stand in the city and the Battle of Neman took place there. On 23 September the Polish Army recaptured the city. After the Peace Treaty of Riga, Grodno remained in Poland.