The first historical Přemyslid was Duke Bořivoj I, baptised in 874 by Saint Methodius. In 895, Bohemia gained independence from Great Moravia. Between 1003 and 1004, Bohemia was controlled by Boleslaus the Brave, Duke of Poland from the Piast dynasty, grandson of Boleslaus I the Cruel.