In 1226 Duke Konrad I of Masovia requested assistance against the Prussians and other Baltic tribes, including the Skalvians who lived along the Neman River. In March 1226, Holy Roman Emperor Frederick II issued the Golden Bull of Rimini, which provided that the Teutonic Knights would possess lands taken beyond the Masovian border in exchange for securing Masovia. After uprisings of the Baltic Prussian tribes in 1242 through 1274 failed, the Order conquered many remaining western Balts in Lithuania Minor, including the Skalvians, Nadruvians, and Yotvingians. In 1252 the Order constructed Memel Castle where the Dangė river flows into the Neman, at the north end of the Curonian Spit. In 1422, after centuries of conflict, the Order and the Polish–Lithuanian union signed the Treaty of Melno which defined a border between Prussia and Lithuania. Although Grand Duke Vytautas of Lithuania wanted the border to be coextensive with the Neman River, the treaty border started north of Memelberg and ran southeasterly to the Neman. This border remained until 1918. After the Treaty of Melno was signed, many Lithuanians returned to northern Prussia, which became known as Lithuania Minor in the 16th century.
After World War I ended in 1918, the Klaipėda Region was defined as a roughly triangular wedge, with the northern border being the Treaty of Melno border, the southern border following the Neman River, and on the west abutting the Baltic Sea. In 1923, fearing that the western powers would create a free state, Lithuanians took control of the region and, as part of larger regional negotiations, incorporated the region into the State of Lithuania. In March 1939 Lithuania acquiesced to Nazi demands and transferred the Klaipėda Region to Germany. As World War II came to an end in 1945, the Soviet Union incorporated the region into the Lithuanian SSR. Since 1990 the area of the Klaipėda Region has formed part of the independent Republic of Lithuania, as part of Klaipėda and Tauragė counties. The southern border established by the Treaty of Versailles defines the current international boundary between Lithuania and the Kaliningrad Oblast of the Russian Federation.