 Aiming for independence from the Margraviate of Brandenburg, he allied himself with Poland and Bohemia.In 1338 Brandenburg relinquished supremacy over Pomerania, and in 1348 Charles IV recognized the duchy as a fiefdom of the Holy Roman Empire, which helped to protect it from the Brandenburg margraves.The civil war in Brandenburg in the years 1349–1354 allowed Barnim III to extend his duchy by conquest.