The city was founded in the second half of the 10th century by King Boleslav II as a royal castle. Because there already was a castle known as Boleslav near Prague, this new castle was named Mladá (young) to distinguish it from the older Boleslav, which became known in the 15th century as Stará Boleslav (Old Boleslav). The town received partial city rights in 1334 and 1436, becoming an important site on the road from Prague to northern Bohemia, Lusatia, and Brandenburg. In the 16th century the town was a leading centre of the Unitas Fratrum / Unity of the Brethren / Moravian Church, hosting the Brethren's bishop, Renaissance church, and printing house. After being re-Catholicized in the 17th century, the town's population declined.