After an unsuccessful revolt in 1334, Hasli passed to the city of Bern as a subject territory in name but regained most of its earlier privileges. Under Bernese control it was the capital of the District of Oberhasli until 1798. Following the 1798 French invasion and the creation of the Helvetic Republic it was the capital of the district of Oberhasli in the Canton of Oberland (1798–1803) and then the capital of the District of Oberhasli in the canton of Bern.