Tired of civil war and anarchy, Moscow leading citizens gathered to elect a new tsar. In 1613, a 16-year old Mikhail Romanov, grandnephew of Ivan the Terrible's first wife Anastasia, was named hereditary tsar. Romanovy dynasty was to rule for more than 300 years up until the October Bolshevik revolution in 1917.
Mikhail Romanov (1613-1645) ruled together with his father, Moscow patriarch Filaret. They made considerable efforts to help the country to rise from the ruins. Mikhail also founded the tradition of state loans from other countries, the tradition of which Russia still can't get rid of. During his reign the amount of foreigners working for Tsar of Russia increased. So-called German Village (Sloboda) appeared in Moscow suburbs; later it became the favourite place of Peter the Great.
Mikhail's heir, Alexey the Quiet (1645-1676) made further steps in modernizing Russia, carried out the codification of the law, although it was exactly during his reign that serfdom, actual slavery, was legalized. In 1654 the Ukraine joined Russia extending influence of the Moscow state to the South. The most important event of Alexey's reign was the schism in the Church between the reformers, led by Patriarch Nikon, and the conservative Old Believers. Difference of opinion concerned mostly ritual details but the schism echoed in following centuries splitting the country into two camps always at enmity.