On 19 August 1991, an unsuccessful attempt at a coup d'état took place in Moscow when a small group of prominent Soviet functionaries failed to regain power due to large pro-democracy demonstrations in Russia. This event resulted in Latvia swiftly moving toward independence. After the coup's failure, the Supreme Soviet of the Latvian Republic announced on 21 August 1991, that the transition period to full independence declared on 4 May 1990 had come to an end. Therefore, Latvia was proclaimed a fully independent nation whose judicial foundation stemmed back to the statehood that existed before the occupation on 17 June 1940.