Following the events of Bloody Sunday, Trotsky secretly returned to Russia in February 1905, by way of Kyiv. At first he wrote leaflets for an underground printing press in Kyiv, but soon moved to the capital, Saint Petersburg. There he worked with both Bolsheviks, such as Central Committee member Leonid Krasin, and the local Menshevik committee, which he pushed in a more radical direction. The latter, however, were betrayed by a secret police agent in May, and Trotsky had to flee to rural Finland. There he worked on fleshing out his theory of permanent revolution.