As the Counter-Reformation in Poland gathered force, pressure began to be used against the Socinians. On April 19, 1638, an incident occurred in which some young students of the academy destroyed or removed a cross, giving the royal court the pretext needed to ban Arian activities, including printing and the schools, and sentenced teachers to exile, many heading south to the Principality of Transylvania. Jesuit scholar Szymon Starowolski justified the closing of Protestant schools (in 1638 and 1640), and Protestant centers and printing presses (in 1638, the press at Raków), as the "duty of good pastors" and as a legitimate act of the King and the Republic. The Arian church in Raków [pl] was demolished in 1640. In 1641 Jakub Zadzik, archbishop of Kraków, began construction of the magnificent Church of the Holy Trinity in Raków [pl] on the same site and settled Franciscan friars in Raków to reconvert the Polish Brethren. The friars left the town around 1649. The main Arian buildings were destroyed, and more destruction was brought by Cossacks and Hungarians in 1657. By 1700 the town had only 700 inhabitants left.
After the Third Partition of Poland, Raków was in the Austrian Partition. Following the Austro-Polish War of 1809, it was regained by Poles and included within the short-lived Duchy of Warsaw, and after its dissolution it fell to the Russian Partition of Poland. In 1820, Raków had 926 inhabitants, in 1864 their number rose to 2,007, a significant part being Jewish. In 1869, like many other Polish towns, Raków has lost its town status and town privileges as punishment for the unsuccessful Polish January Uprising.