The Margraviate of Brandenburg entered the scene after Mestwin II, son of Swietopolk, concluded the Treaty of Arnswalde with them, in order to receive aid against his brother, Wartislaw. The margraves took over the town in 1270/1 from Wartislaw, but did not hand it over to Mestwin until the latter was able to force them out by concluding an alliance with Boleslaw Pobozny, duke of Greater Poland. Under the rule of Brandenburg, conflicts erupted between the Slavic and German populations, which cost many lives. In the 1282 Treaty of Kępno Mestwin II promised his Pomerelian duchy to his ally Przemysł II, duke and later king of Poland, who succeeded to the duchy after Mestwin's death in 1294.