Despite being lumped together administratively today, Warmia and Masuria have always been separate entities with separate populations, and their histories, though broadly similar, are largely independent.
Warmia is imaginatively named after its original inhabitants, the Warmians, who were wiped out by the Teutonic Knights in the 13th century. The Knights then set up a Teutonic province. For more than five centuries this was largely an autonomous ecclesiastical state run by Catholic bishops.
The Warmian diocese was the largest of four that were created by the papal bulls of 1243. Though administratively within the Teutonic state, the bishops used papal protection to achieve a far-reaching autonomy. Their bishopric extended from the north of Olsztyn up to the present-day national border, and from the Vistula Lagoon in the west to the town of Reszel in the east. Following the 1466 Treaty of Toruń, Warmia was incorporated into the kingdom of Poland, but the bishops retained much of their control over internal affairs, answering directly to the pope. When the last grand master adopted Protestantism in 1525, Warmia became a bastion of the Counter-Reformation. In 1773 the region fell under Prussian rule, along with swaths of western Poland.
Meanwhile, Masuria was dealing with its own upheavals. The Jatzvingians (Jaćwingowie), the first inhabitants, belonged to the same ethnic and linguistic family as the Prussians, Latvians and Lithuanians. For farmers they were unusually warlike, and caused plenty of headaches for the Mazovian dukes, as they invaded and ravaged the northern outskirts of the principality on a regular basis and even pressed as far south as Kraków. In the second half of the 13th century, however, the Teutonic Knights expanded eastwards over the region, and by the 1280s they had wiped them out too.
The region quickly became a bone of contention between the Teutonic order and Lithuania, and remained in dispute until the 16th century. At that time the territory formally became a Polish dominion, but its colonisation was slow. Development was also hindered by the Swedish invasions of the 1650s and the catastrophic plague of 1710.
In the Third Partition of 1795, the region was swallowed up by Prussia, and in 1815 it became a part of the Congress Kingdom of Poland, only to be grabbed by Russia after the failure of the November Insurrection of 1830. After WWI Poland took over the territory, though not without resistance from Lithuania, but the region remained remote and economically unimportant. Warmia was finally restored to Poland after WWII, and the two halves became a single administrative zone.