In the early to mid 1920's, Stalin was working under Lenin in russian government as a General Secretary. After Lenin died in 1924, Stalin maneuvered himself into the forefront of the ruling Communist party, and although he was not technically the head of government, he set the party's agenda and trusted the enforcement of this agenda to his close ally Molotov, who was the head of government. From this point until the beginning of the second world war, Stalin continued to exert his power through the communist party and his friends who governed the union.