During the reign of Emperor Louis IV his son Stephen served as vogt of Swabia and Alsace. The Emperor had acquired Brandenburg, Tyrol, Holland and Hainaut for his House but he had also released the Upper Palatinate for the Palatinate branch of the Wittelsbach in 1329. When his father died in 1347, Stephen succeeded him as Duke of Bavaria and Count of Holland and Hainaut together with his five brothers. Louis IV had reunited Bavaria in 1340 but in 1349 the country was divided for the emperor's sons again into Upper Bavaria, Lower Bavaria-Landshut and Bavaria-Straubing. Stephen II ruled from 1349 to 1353 together with his brothers William I and Albert I in Holland and Lower Bavaria-Landshut, since 1353 only in Lower Bavaria-Landshut.