Boris Godunov is an opera by Modest Mussorgsky (1839-1881). The work was composed between 1868 and 1873 in Saint Petersburg, Russia. It is Mussorgsky's only completed opera and is considered his masterpiece. Its subject is the Russian ruler Boris Godunov, who reigned as Tsar from 1598 to 1605. The libretto was written by the composer, and is based on the drama of the same name by Alexander Pushkin, and on Nikolay Karamzin's History of the Russian State. Boris Godunov, among major operas, shares with Verdi's Don Carlos the distinction of having the most complex creative history and the greatest wealth of alternative material. The composer created two versions the Original Version of 1869, which was rejected for production by the Imperial Theatres, and the Revised Version of 1872, which received its first performance in 1874 in Saint Petersburg. These versions constitute two distinct ideological conceptions, not two variations of a single plan. Several composers, chief among them Nikolay Rimsky-Korsakov, have created new editions of the opera to "correct" perceived technical weaknesses in the composer's original scores.