The Union of Kėdainiai (or Agreement of Kėdainiai, Lithuanian: "Kėdainių unija", Polish: "Umowa Kiejdańska") was an agreement between several magnates of the Grand Duchy of Lithuania and the king of the Swedish Empire, Charles X Gustav that was signed on 20 October 1655, during the Swedish Deluge of the Second Northern War. In contrast to the Treaty of Kėdainiai of 17 August, which put Lithuania under Swedish protection, the Swedish-Lithuanian union's purpose was to end the Lithuanian union with Poland and to set up two separate principalities in the Grand Duchy of Lithuania.