On March 17, 1991, an all-Russian referendum created the post of President of the RSFSR. On June 12, Boris Yeltsin was elected President of Russia by popular vote. During an unsuccessful coup attempt on August 19–21, 1991 in Moscow, the capital of the Soviet Union and Russia, President of Russia Yeltsin strongly supported the President of the Soviet Union, Mikhail Gorbachev.