The Kornilov Affair was caused by a Tsarist general, Kornilov, who took charge of the army under the Provisional Government. However, Kornilov soon got displeased at the way the PG was running Russia, and wanted the Tsar back in power, as he was a supporter of the Tsarist regime. Thus, Kornilov marched hi loyal troops on Petrograd and threatened to overthrow the PG. This made Kerensky fear for his life, and did not want to let Petrograd to fall into Kornilov's hands. Since Kerensky now had no army to call on, he had no choice but to ask the Petrograd Soviet to defend Petrograd. This meant that Kerensky had to arm the Red Guards, the unofficial militia that protected the Bolsheviks and Petrograd Soviet. By arming his own enemies, Kerensky puts himself at a major disadvantage, as the Bolsheviks can use protecting Petrograd as propaganda to convince the people that the Bolsheviks are better than the PG. The Red Guards, under Trotsky's leadership, defended key points in Petrograd, and managed to convince Kornilov's troops to not fight their own countrymen and stand down. Kornilov was arrested, and the revolution was saved. This gave the Bolsheviks a prime position to make use of their victory to produce propaganda. The Bolsheviks portrayed themselves as saviours of the revolution and Petrograd, and also portrayed Kerensky as incompetent and unable to rule Russia well, as Kerensky was the one who appointed Kornilov as the commander-in-chief of the army. Therefore, the Kornilov Affair was a factor in the success of the Bolshevik revolution in 1917.