The Union of Kėdainiai (or Agreement of Kėdainiai, Lithuanian: Kėdainių unija, Swedish: Kėdainiai förbund) 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. One of them was to be ruled by the Radziwiłł (Radvila) family, and the rest of the duchy was to remain a Swedish protectorate. The agreement was short-lived since the Swedish defeat at the Battles of Warka and Prostki and an uprising organised by the pro-Commonwealth nobility in Poland and Lithuania put an end to Swedish power and to the Radziwiłłs' influence. History The Radziwiłł family owned vast areas of land in Lithuania and Poland, and some of its members were dissatisfied with the role of the magnates, who in Poland–Lithuania theoretically had the same rights as the Polish nobility. Eventually, the interests of the wealthy clan, known as the "Family", and the Crown began to drift apart. In 1654, during the Swedish-Russian invasion of Poland, known as The Deluge, two notable princes of the Radziwiłł clan, Janusz and Bogusław, began negotiations with Swedish King Charles X Gustav that were aimed at dissolving the Polish–Lithuanian Commonwealth and the Union. Lithuania was then in turmoil and was being attacked on two separate fronts by Russia and Sweden, and a Ukrainian peasant revolt, known as the Khmelnytsky Uprising, was spilling into the Grand Duchy's southern regions from Ukraine. Eventually, most of the Polish-controlled Lithuanian army surrendered to the Swedes, and the state collapsed. Most of the Crown of Poland, along with west of Lithuania, was occupied by Swedish forces, and the Russians seized most of Lithuania (except Samogitia and parts of Suvalkija and Aukštaitija). On 17 August, Janusz Radziwiłł signed the Treaty of Kėdainiai, which places the Grand Duchy under Swedish protection. On 10 October 1655 (O.S.), Janusz and Bogusław Radziwiłł signed an agreement with the Swedes at their castle at Kėdainiai. According to the treaty, signed by over 1,000 members of the Lithuanian nobility, the Polish–Lithuanian Union was declared null and void. In exchange for military assistance against