Herzogtum Glogau
In 1294, Duke Henryk III of the Duchy of Głogów, founded a church in honour of Saint Hedwig, patron saint of Silesia. This building, today called the "konkatedra św. Jadwigi w Zielonej Górze", is the oldest building in the city. A wooden castle near the city, built ca. 1272, was the residence of Duke John of Ścinawa from 1358 to 1365; Janusz had ceded his lands to Duke Henry V of Iron. In 1477 the town defeated a 5,000-strong army from neighbouring Brandenburg which attempted to seize it during the succession war to the Duchy of Głogów. In 1488, Duke John II of Żagań, destroyed the castle to prevent his enemies from using it. The deposition of Duke John II of Żagań in 1488 marked the end of the long rule of the Piast dynasty in the Duchy of Głogów and the city of Zielona Góra. Later on, the duchy was ruled by future Kings of Poland John I Albert and Sigismund I the Old, before it was integrated with the Kingdom of Bohemia in 1506, although Polish king Sigismund I the Old still claimed his rights to the city only in 1508. The city flourished during the reign of Sigismund I the Old. In 1505 Sigismund issued a privilege allowing the sale of cloth products from Zielona Góra throughout Poland. In 1641, King Władysław IV Vasa of Poland confirmed these rights. Another important branch of the city's economy was winemaking.