Stalin was appointed General Secretary by Lenin in 1922. When Lenin died in 1924, Stalin gradually removed his rivals and became the sole dictator of the USSR in the late 1920s.