Putin was born in Leningrad in the Soviet Union. He studied law at Leningrad State University, graduating in 1975. Putin was a KGB foreign intelligence officer for 16 years, rising to the rank of Lieutenant Colonel before resigning in 1991 to enter politics in Saint Petersburg. He moved to Moscow in 1996 and joined President Boris Yeltsin's administration, rising quickly through the ranks and becoming Acting President on 31 December 1999, when Yeltsin resigned. Putin won the 2000 presidential election by a 53% to 30% margin, thus avoiding a runoff with his Communist Party of the Russian Federation opponent, Gennady Zyuganov. He was reelected president in 2004 with 72% of the vote. During his first presidency, the Russian economy grew for eight straight years, and GDP measured in purchasing power increased by 72%. The growth was a result of the 2000s commodities boom, high oil prices, and prudent economic and fiscal policies. Because of constitutionally mandated term limits, Putin was ineligible to run for a third consecutive presidential term in 2008. The 2008 presidential election was won by Dmitry Medvedev, who appointed Putin as Prime Minister, the beginning of what some opponents considered to be a period of "tandemocracy".