Until 1863, Tchaikovsky worked as a legal officer, before he studied music in St Petersburg with, among others, Anton Rubinstein. Between 1866 and 1877, he was a teacher of music theory at the Moscow conservatory. Afterwards, he toured Europe as a conductor and frequently lived abroad. He failed to gain appreciation as an opera composer. None of his stage works were particularly successful. When his first work in that genre, Vojevoda, achieved at least moderate success, the following work, Undine, was refused by the St Petersburg Opera the composer destroyed it. Though Eugene Onegin was received favourably, it marked a tragedy in his life as he himself had been in the same situation as Onegin, but, unlike Pushkin's character, had accepted a marriage doomed from the beginning. The work was completed in a period of severe depression after the short marriage. The works from the early eighties, Jeanne d'Arc and Mazeppa, achieved only posthumous fame. His last opera, Iolanta, was commissioned by the St Petersburg Opera and performed together with the Nutcracker ballet.