In the late 16th and early 17th centuries, Russia was in a state of political and economic crisis. After the death of the Tsar Ivan IV  in 1584, and the death of his son Dimitri in 1591, several factions competed for the tsar's throne. In 1598, Boris Godunov was crowned to the Russian throne, marking the end of the centuries long rule of the Rurik dynasty. While his policies were rather moderate and well-intentioned, his rule was marred by the general perception of its questionable legitimacy and allegations of his involvement in orchestrating the assassination of Dimitri. While Godunov managed to put the opposition to his rule under control, he did not manage to crush it completely. To add to his troubles, the first years of the 17th century were exceptionally cold. The drop in temperature was felt all over the world, and was most likely caused by a severe eruption of a volcano in South America. In Russia, it resulted in a great famine that swept through the country from 1601 to 1603.

Based on the above article, answer a question. What happened second: death of the Tsar Ivan or death of his son Dimitri?
death of his son Dimitri