Within days after the Soviet occupation of Estonia in 1940, Päts was forced to appoint a Communist-dominated puppet government headed by Johannes Vares, following the arrival of demonstrators accompanied by Red Army troops with armored vehicles to the Presidential palace. The Vares government had actually been chosen by Soviet official Andrei Zhdanov. Following the sham elections in July, Päts was dismissed from office.