Extract of Vladamir Putin's wikipedia entry:
From 1985 to 1990, the KGB stationed Putin in Dresden, East Germany. Following the collapse of the East German government, Putin was recalled to the Soviet Union and returned to Leningrad, where in June 1991 he assumed a position with the International Affairs section of Leningrad State University, reporting to Vice-Rector Yuriy Molchanov. In his new position, Putin maintained surveillance on the student body and kept an eye out for recruits. It was during his stint at the university that Putin grew reacquainted with his former professor Anatoly Sobchak, then mayor of Leningrad.
Putin finally resigned from the active state security services with the rank of Lieutenant colonel on 20 August 1991 (with some attempts to resign made earlier), on the second day of the KGB-supported abortive putsch against Soviet President Mikhail Gorbachev. Putin later explained his decision: "As soon as the coup began, I immediately decided which side I was on", though he also noted that the choice was hard because he had spent the best part of his life with "the organs".