In the second half of 1926, Berek served in 83rd Infantry Regiment at Kobryn. In December 1926 he was transferred back to 9th Legions Infantry Regiment, and in the period May 1929 - September 1931, he attended Wyższa Szkoła Wojenna in Warsaw. After completing his officer course, he was chief of staff of the 4th Infantry Division, stationed in Toruń (1931 - 1934), and in 1934 - 36, he commanded 1st Rifle Battalion in Chojnice. Promoted to Lieutenant Colonel on 1 January 1935, Berek served at the Polish General Staff (October 1936 - July 1939). A few weeks before the Invasion of Poland, he was sent to Jarosław, to command 3rd Legions' Infantry Regiment. Berek remained in his post until the capitulation of Modlin Fortress, on 29 September 1939 (see Battle of Modlin).