In the Middle Ages Lower Silesia was part of Piast-ruled Poland. It was one of the leading regions of Poland, and its capital Wrocław was one of the main cities of the Polish Kingdom. Lower Silesia emerged as a distinctive region during the fragmentation of Poland, in 1172, when the Duchies of Opole and Racibórz, considered Upper Silesia since, were formed of the eastern part of the Duchy of Silesia, and the remaining, western part was since considered Lower Silesia. During the Ostsiedlung, German settlers were invited to settle in the sparsely populated region, which until then had a Polish majority. As a result, the region became largely Germanised in the following centuries.