During the Middle Ages a significant trade route over the Alps to Valais and Lake Geneva passed through the Zweisimmen region. A number of farming villages probably existed in the area during the Middle Ages. In the 13th and 14th centuries, local nobles built several castles, Upper Mannenberg and Lower Mannenberg, Reichenstein-Terenstein, Blankenburg and Steinegg Castles, to protect and collect taxes from the roads. The villages and castles passed through several noble families until 1378 when the Lord of Düdingen sold the lands to Fribourg following an uprising. After the Battle of Sempach in 1386, Bern conquered the Simmen river valley (Simmental) and acquired Zweisimmen. The Bernese administrator over the upper Simmen valley was installed at Blankenburg Castle. Reichenstein-Terenstein Castle and estates were acquired by the Bubenberg family in 1456, and sold to Bern in 1493. Blankenburg village remained the political center of the Obersimmental district through the 1798 French invasion and the Act of Mediation in 1803. It remained the capital until the district was dissolved in 2009.