Shortly after the defeat in the Battle of Warsaw in 1920 , the withdrawing Red Army handed the city over to Lithuania , in accordance with the Russo-Lithuanian agreement of July 12 of that year .
Shortly after its defeat in the Battle of Warsaw ( 1920 ) , the retreating Red Army ceded the city back to Lithuania by signing a peace treaty on July 12 , 1920 .