with karl theodor von pfalz-sulzbach becoming elector duke of bavaria in 1778 government takeover, the area was again part of the electorate of bavaria, but the areas were incorporated only after the napoleonic wars of the upper palatinate. schmidmühlen possessed a market court with magisterial proper rights.