It partially followed the historic border between the Holy Roman Empire and Greater Poland, but with certain adjustments that were intended to reasonably reflect the ethnic compositions of small areas near the traditional provincial borders. However Pomerelia and Upper Silesia had been divided, leaving areas populated by the Polish as well as other Slavic minorities on the German side and a significant German minority on the Polish side. Moreover, the border left Germany divided into two portions by the Polish Corridor and the independent Free City of Danzig, which had an overwhelmingly German population, but was split from Germany to help secure Poland's access to the Baltic Sea.[citation needed]