The earliest mention of Krosno preserved in writing, dated 1005, speaks of a great army which crossed a bridgehead on the bank of the Odra (Oder) river near Krosno, in an attempt to subdue it. From the description of the chronicler, Bishop Thietmar of Merseburg, who witnessed those events, we learn that the king Boleslaw Chrobry (Boleslaw the Brave), having fortified the shore of the Odra (Oder) river, settled with his large army near Krosno, making it difficult for the German king Henry to get across. The settlement of Krosno since the first Piast rulers was forced to defend itself against the invasions of Germans. Since its foundation, it was assigned strategic importance due to the topography of the area, especially the surrounding rivers. As a result, Krosno Odrzanskie was classified as one of the most important fortresses in the west and was considered a Polish state fortress. In medieval times, the city played a significant role in the defence system of the Polish western border. However, raising Krosno Odrzanskie to the rank of a castellany influenced the development of economic and defensive functions of the city. These were mirrored in a fortified castle from the first half of the 13th century, which was one of the main residences of the rulers of Silesia.