The Union of Lublin was an international agreement signed in 1569 between Poland and Lithuania which united the two states into one commonwealth. It brought about the formal creation of a state called the Polish-Lithuanian Commonwealth which existed well over two centuries, until it was partitioned by Prussia, Russia and Austria in 1795.
This was the longest-lasting union of states in European history – it lasted, for example, over a century longer than the Kalmar union of the Scandinavian states (1397-1523).