The Grand Duchy of Lithuania and the Kingdom of Poland united for the first time in 1386. Then the Lithuanian prince Jagiello, who was already over 30 years old, married the only heir to the Polish throne, Queen Jadwiga. But already in 1392, Jagiello’s nephew, Vitovt, seized power in Lithuania, and the union broke up. In the future, Poland and Lithuania most often had a common monarch, from the beginning of the 16th century — constantly. It was not a single state, it was a union of two states under the scepter of one monarch, whose power in both Poland and Lithuania was limited by the councils of the nobility.
From the end of the 15th century, Lithuania was strongly crowded by Moscow and constantly lost land. Grand Duke Alexander was forced to cede to Moscow in 1494 the Verkhovsky (in the upper reaches of the Oka) principalities, whose princes went to the service of the Moscow Grand Duke Ivan III. After the war of 1500-1503, Seversky lands passed to Moscow from Lithuania. In 1522, after another war, the Polish king and the Lithuanian Grand Duke (in one person) Sigismund I ceded the Smolensk land to the Grand Duke of All Russia Vasily III.
In 1558, Tsar Ivan IV of Russia began to conquer access to the Baltic Sea. He quickly defeated the declining Livonian Order. But Lithuania, Poland and Sweden rushed to divide the booty. They began to act together against Russia.
There has always been rivalry between Polish and Lithuanian lords. The Poles envied the vast possessions of Lithuania, which included Belarus and Ukraine. With particular envy, the Poles looked at Ukraine, where they hoped to get rich lands along the Dnieper. Poland did not always seek to help Lithuania in its difficulties with Russia, as it hoped that sooner or later the Lithuanians themselves would resort to the Poles with prayers, and there it would be possible to set certain conditions for them. And so it happened.
The long overdue idea of the complete and final unification of Poland and Lithuania was finally realized under the pressure of the Russian troops. Among the Litvinians, there was a gravitation towards the Polish order, since they assumed more freedom for the nobility, a significant restriction on the power of the king. However, the Poles had to overcome strong opposition to the unification, which came mainly from the Orthodox.
In January 1569, the Sejm of the Polish and Lithuanian nobility was convened in Lublin, which was to decide the question of the unity of both states. When the negotiations reached an impasse, and the Lithuanian magnates left the Sejm, the Poles began to act decisively. The king, relying on the support of the Polish part of the Sejm, issued laws that annexed the Ukrainian regions of Lithuania to the Polish crown. These laws did not arouse opposition among the Lithuanian gentry in Ukraine, who were dissatisfied with the dominance of large magnates. The Litvins were forced to return to the Sejm and sign the terms of the unification.
A dual state was created — the Commonwealth (tracing paper from the Latin word Republic). This name emphasized that the new state is popular and exists for the public good (res publica in Latin — the business of society). A common monarch was established in it forever, but this monarch was elective. Accordingly, a common Sejm and Senate were established, a single monetary unit for the entire Commonwealth. Although many laws, judicial regulations, features of military service for a long time remained different in Poland and Lithuania.
The Union of Lublin opened the way for the Polish magnates and gentry to seize land with peasants in Ukraine, and the Catholic Church made it easier to corrupt the Orthodox in Lithuania. But, most importantly, Poland and Lithuania joined their efforts in the fight against Russia and for some time, until the middle of the 17th century, managed to stop the process of the return of Russian lands to the Russian state, going on the counteroffensive and re-taking Smolensk from Russia at the beginning of the 17th century and Northern lands.