In 1902, the Marshak family moved to Saint Petersburg. There was a complication: as a Jew, Marshak could not legally live outside the Pale of Settlement, thus he could not attend school while living in the city. Philanthropist and scholar Baron David Gunzburg took an interest in Marshak and introduced him to the influential critic Vladimir Stasov. Stasov was so impressed by the schoolboy's literary talent that he arranged an exception from the Pale laws for Samuil and his family. He also introduced Marshak to Maxim Gorky and Feodor Chaliapin.