The Truce of Andrusovo ended the Thirteen Years War (1654-67) between Muscovy and Poland-Lithuania. The truce was originally to last for thirteen and a half years. The Ukraine was partitioned between Muscovy and Poland-Lithuania. The dividing line was the Dnieper River, with Muscovy getting the left bank and Poland-Lithuania retaining the right bank. Kiev, on the right bank, was to be held by Muscovy for two years and then returned to Poland-Lithuania, but the city was retained by Russia, and when the truce became a permanent peace in 1686 Russia retained Kiev. Muscovy also finally regained Smolensk, Chernihiv and parts of Witebsk, areas lost during the Russian Time of Troubles (1604-1613).