Niagara was the first permanent Anglo settlement in present-day Ontario. From 1792 until 1796 it was the capital of Upper Canada. It was important for the transhipment of goods in North America, developed as a farming community to serve the needs of the British garrison and the growing refugee population, and a vigorous commercial area. Because of Niagara's importance, eventually the entire length of the Niagara River was defended by artillery batteries.