Civil war in Pomerelia

The civil war in Pomerelia was a military conflict in Pomerelia fought from 1269 to 1272. The conflict began between members of the Samboride dynasty, with Mestwin II, ruler of the Duchy of Świecie fighting against Wartislaw II of Gdańsk, ruler of the Duchy of Gdańsk, and Sambor II, ruler of the Duchy of Lubiszewo. In 1270, Mestwin had conquered their states, unifying the Duchy of Pomerelia under his rule. Wartislaw II and Sambor II continued to fight from exile, aided by the Duchy of Inowrocław and the State of the Teutonic Order, while Mestwin had allied with Bolesław the Pious, ruler of the Duchy of Greater Poland. In 1271, the war was joined by the Margraviate of Brandenburg who attempted to conquer the Duchy of Pomerelia. The war ended in January 1272, with Mestwin II's victory, establishment of the Duchy of Pomerelia, and partition of the Duchy of Inowrocław between Pomerelia and Greater Poland.

Background
On 10 January 1266, Swietopelk II, the ruler of the Duchy of Gdańsk died. Following his death, his state had been partitioned between his sons, Wartislaw II of Gdańsk, and Mestwin II. The exact boundaries of the partition remain unknown, due to the lack of necessary historical records. It is known that Wartislaw was given the city of Gdańsk, with the surrounding area. In such partition he might have also become the ruler of the land of Białogarda, however it remains unknown who was the ruler of the area at the time. Until 1262, the area belonged to the Duchy of Białogarda, under the rule of Ratibor of Białogarda. 1268 marks the first year in which Wartislaw II is named the ruler of Białogarda in any existing documentation. It remains unknown which of the brothers received the Słupsk and Sławno Land in the partition. Later, the Słupsk and Sławno Land had been attacked, either in 1266 by Barnim I, duke of the Duchy of Pomerania, or in 1269, by Barnim I and Vitslav II, prince of the Principality of Rügen, which resulted, with Sławno being conquered.

Conflict
Mestwin II wasn't satisfied with the partition, being in the belief that, as the oldest heir, he held the right to Gdańsk, the most prestigious city in Pomerelia, and the capital of his father's state. As such, he started planning on gaining control over that area. On 1 April 1269, he met in Choszczno, with John II, Otto IV, and Conrad, the margraves of Brandenburg, from the House of Ascania, from Stendal. During the meeting, he paid homage to them, giving them his lands, which then were given back to him, making him their vassal. The exception was the area of Białogarda, which was then incorporated into the Margraviate of Brandenburg. Additionally, somewhen between 1269 and 1271, Mestwin promised to give Gdańsk to the margraves.

The agreement angered the nobility and the knighthood of Świecie, which led to their rebellion against Mestwin, in the summer of 1269. They captured him, and imprisoned him in Raciąż. Following that, they offered the throne of Świecie to Wartislaw II. However, soon after that, Mestwin had been rescued by the knights loyal to him. As such, in the autumn of 1269, he began an attack on states of Wartislaw II, and Sambor II, duke of the Duchy of Lubiszewo. The exact origin of his army remains unknown, however, they could have been either the mercenaries from the State of the Teutonic Order, or the reinforcements sent from the Margraviate of Brandenburg. Most likely at the beginning of 1270, he conquered the Duchy of Lubiszewo, with no major resistance, as Sambor II with his army were at the time in Kuyavia. As such, Mestwin had united the territories of his dynasty under one state, the Duchy of Pomerelia. Following that, his army captured Gdańsk, again, with no major resistance from city defenders. After the fall of the city, Wartislaw and Sambor II escaped to Elbing (now Elbląg, Poland), in the State of the Teutonic Order, and later Wartislaw found refuge in the Duchy of Inowrocław, on the royal court of duke Ziemomysł of Kuyavia. Wartislaw was given a fort in Wyszogród, where, he would organize the operation base for his future attack on Mestwin's territories.

Sambor II had allied with the Teutonic Order, which gave him military aid. As such, on 29 June 1270, he with the Teutonic forces had organized a raid on the Mestwin's territories, near the town of Nowe, which resulted in them kidnaping a lot of people and stealing cattle. In the late August 1270, the Teutonic forces had launched an attack headed to Tczew, a former capital of Sambor's state. Mściwoj's forces had avoided the fighting in the open field. Teutonic forces had destroyed well-fortified fort in Gorzędziej, but were not able to capture well-fortified Tczew. Following that, in the late 1270 or early 1271, Mestwin II had offered to give unspecified lands of his state, located in the area of Świecie, Nowe, and Tymawa to the Teutonic Order, in exchange of them ceasing the aid to Sambor II, which they agreed to. On 9 May 1271, Wartislaw had died in suspicious circumstances in Wyszogród. Soon after, in the summer, Mestwin had allied with Bolesław the Pious, the ruler of the Duchy of Greater Poland, and together, their forces had invaded the Duchy of Inowrocław. During the invasion, Mestwin's forced had attacked and captured Wyszogród, where opposition forces were still organizing. The invasion ended in their victory, with the duchy being captured, Ziemomysł escaping to the exile, and Sambor II being captured. The territory of the duchy was incorporated into the Duchy of Greater Poland, with the exception of Wyszogród, and surrounding lands, which were incorporated into Mestwin's state.

While Mestwin II remained with his army in Kuyavia, the military forces of the Margraviate of Brandenburg, had arrived in the Pomerelia. Though, officially claiming to arrive as the military aid to Mestwin, they had captured his territories, including the towns of Gdańsk and Tczew, with the help of the local German-speaking population, who had capitulated the towns to them.

In November and December 1271, Mestwin had unsuccessfully attempted to reconquer lost territories. Owing to small army to fight off the invaders alone, at the end of the year, following his advisors, he had requested military help from Bolesław the Pious, who had immediately set off to help, without time-consuming preparations, leading a smaller army of forces that were available in Inowrocław. In January 1272, they combined forces had begun the attack on Gdańsk. They had set fire around the city, and stormed into it with soldiers. They had captured city, forcing the Brandenburgian army to retreat from Mestwin's territories. During the battle, all Brandenburgian soldiers were killed, with the exception to those who managed to hid in a fortifications tower.

Aftermath
Following the capture of the city, the people who conspired with Brandenburg were put in front of the court, made out of Mestwin II and the local nobility. They were accused of treason, and many of them were exiled, executed and had their land property confiscated. The city itself was deprived of its fortifications, and its economical and political status was severely weaken for the following years. Many former subjects of Sambor II who also conspired with Brandenburg had their land property confiscated.

On 3 September 1273, Mestwin II had met with John II, Otto IV, and Conrad, the margraves of Brandenburg, to negotiate. In the signed agreement had agreed to give the Lands of Schlawe and Stolp to them as a fiefdom and ruling it as their vassal. He had also agreed to give them his military aid in the case of a war, including against his ally, Bolesław the Pious.