Stockport is an industrial town in Greater Manchester, England, south-east of Manchester, south-west of Ashton-under-Lyne and north of Macclesfield. The River Goyt and Tame merge to create the River Mersey here. It is the main settlement of the wider Metropolitan Borough of Stockport. Most of the town is within the boundaries of the historic county of Cheshire, with the area north of the Mersey in the historic county of Lancashire. Stockport in the 16th century was a small town entirely on the south bank of the Mersey, known for the cultivation of hemp and manufacture of rope. In the 18th century, it had one of the first mechanised silk factories in the British Isles. Stockport's predominant industries of the 19th century were the cotton and allied industries. It was also at the centre of the country's hatting industry, which by 1884 was exporting more than six million hats a year; the last hat works in Stockport closed in 1997. The town's football club, Stockport County, is nicknamed 'The Hatters'. Dominating the western approaches to the town is Stockport Viaduct. Built in 1840, its 27 brick arches carry the mainline railways passing through the town over the River Mersey. Stockport was recorded as "Stokeport" in 1170. The currently accepted etymology is Old English port, a market place, with stoc, a hamlet (but more accurately a minor settlement within an estate); hence, a market place at a hamlet. Older derivations include stock, a stockaded place or castle, with port, a wood, hence a castle in a wood. The castle probably refers to Stockport Castle, a 12th-century motte-and-bailey first mentioned in 1173. Other derivations are based on early variants such as Stopford and Stockford. There is evidence that a ford across the Mersey existed at the foot of Bridge Street Brow. Stopford retains a use in the adjectival form, Stopfordian, for Stockport-related items, and pupils of Stockport Grammar School style themselves Stopfordians. Stopfordian is used as the general term, or demonym used for people from Stockport, much as someone from London would be a Londoner.