The first railway line to be built in the area was the Manchester and Leeds Railway (M&LR) which opened on 4 July 1839 to Littleborough and throughout on 1 March 1841. Although this line ran close to Rochdale, it missed out Middleton and more importantly Oldham as well. A station was built at Mills Hill to provide a railhead for Middleton and Oldham. This was only intended as a short time measure given that Oldham was already a substantial manufacturing centre by this date. The first railway into Oldham was a branch from Middleton Junction to Oldham Werneth which opened on 31 March 1842. This line included the Werneth Incline which had a gradient of 1 in 27 and was one of the steepest lines in the country regularly used by passenger trains. The situation of the first station in Oldham on the outskirts of town was not entirely satisfactory, and in 1847 the Lancashire and Yorkshire Railway, the successor to the M&LR, extended the line from Oldham Werneth to a new station at Oldham Mumps. There was also an intermediate station at Oldham Central. The line and the two new stations opened on 1 November 1847.