The first European visitor to Western Australia was the Dutch explorer Dirk Hartog, who visited the Western Australian coast in 1616. The first European settlement of Western Australia occurred following the landing by Major Edmund Lockyer on 26 December 1826 of an expedition on behalf of the New South Wales colonial government. He established a convict-supported military garrison at King George III Sound, at present-day Albany, and on 21 January 1827 formally took possession of the western third of the continent for the British Crown. This was followed by the establishment of the Swan River Colony in 1829, including the site of the present-day capital, Perth.
York was the first inland settlement in Western Australia. Situated 97 kilometres (60 miles) east of Perth, it was settled on 16 September 1831.
Western Australia achieved responsible government in 1890, and federated with the other British colonies in Australia in 1901. Today its economy mainly relies on mining, agriculture and tourism. The state produces 46% of Australia's exports. Western Australia is the second-largest iron ore producer in the world.
The total length of the state's eastern border is 1,862 km (1,157 mi). There are 20,781 km (12,913 mi) of coastline, including 7,892 km (4,904 mi) of island coastline. The total land area occupied by the state is 2.5 million km2.