The Estonian government-in-exile was the formally declared governmental authority of the Republic of Estonia in exile, existing from 1944 until the reestablishment of Estonian sovereignty over Estonian territory in 1991 and 1992. It traced its legitimacy through constitutional succession to the last Estonian government in power prior to the Soviet invasion of 1940. During its existence, it was the internationally recognized government of Estonia. The USSR occupied Estonia on June 14, 1940. Soviet authorities arrested President Konstantin Päts and deported him to the USSR where he died in prison in 1956. Many members of the current and past governments were deported or executed, including eight former heads of state and 38 ministers. Those who survived went underground. Sham elections were held on 14–15 July 1940 for a "People's Riigikogu," in which voters were presented with a single list dominated by communists. This election is now considered illegal and unconstitutional, since it was conducted on the basis of an electoral law that had not been approved by the upper chamber, as required by the Estonian constitution. The upper house had been dissolved soon after the occupation and was never reconvened. The "People's Riigikogu" met on 21 July, with only one order of business–a resolution declaring Estonia a Soviet republic and petitioning to join the Soviet Union. The resolution passed unanimously. Päts was forced to resign on either 21 July or 22 July, depending on the source. In accordance with Section 46 of the Estonian constitution, Johannes Vares, who had been serving as prime minister of a Communist-dominated puppet government appointed in June, then took over the president's powers under the title of "Prime Minister in duties of the President" and presided over the final stages of the Soviet takeover until Estonia was formally incorporated into the Soviet Union on 9 August. However, Jüri Uluots the last constitutional prime minister at the time of Soviet occupation, maintained that Vares' appointment as prime minister was illegitimate, and therefore he was the legitimate acting head of state with the loss of Päts.