The military regime lasted until 1824, when settlers were granted municipal rights, i.e., 'the right of self-government'. For many years Perth was the military, judicial, political and social capital, not only of the County of Lanark, but of the whole of the Ottawa Valley, north and west, until owing to the construction of the Rideau Canal, and the development of the lumber industry further north and west along the Ottawa, it finally was eclipsed by the town called "Bytown"—the present City of Ottawa, the Capital of the Dominion. But for many years the people of the town of Bytown, while it was still 'Bytown' had to come to Perth for their law and justice, for the law courts of the whole great district were located there.