The towns of Otley and Ilkley both lie in Wharfedale and the early railway schemes passed the valley by.
 An act of parliament had been obtained by the Lancashire & Yorkshire North Eastern Railway (incorporated as the Wharfdale [sic] Railway Company) in 1846 to build a line from Skipton through Ilkley and Otley to Arthington but the scheme failed as the company could not raise the necessary capital and was wound up in 1852.

A second proposal was made in 1856 for a company called the Wharfedale Railway to construct a line on the same route as that authorised in 1846, but the promoters of this scheme could get no support from the major companies (the MR and the NER) who operated the lines into which the Wharfedale Railway would connect.

Finally in 1860, following approaches from local representatives, the NER and the MR met and agreed to build a joint line between Otley and Ilkley.
 The Midland Railway would make a connection with the new line by building a branch from the Leeds to Bradford line at Apperley Bridge to a junction at Burley in Wharfedale and the NER would build a branch from its Leeds to Harrogate line at Arthington to make an end-on connection with the new line at Otley.
 The necessary parliamentary powers were granted in 1861 with the passing of two acts; the Midland Railway (Otley and Ilkley Extension) Act 1861 and the North Eastern Railway (Extension to Otley and Ilkley) Act 1861.
 To obtain its Act the MR had to agree to demands from the residents of Bradford who felt aggrieved that with the construction of the line there would be two direct routes between Ilkley and Leeds (Ilkley—Guiseley—Leeds & Ilkley—Arthington—Leeds) and none between Bradford and Ilkley.
 The act therefore stated that "equal facilities and advantages as regards trains and the conveyance and accommodation of passengers on the Railway shall be afforded to or from Bradford as those to or from Leeds".

Construction began in 1863 with The MR taking responsibility for building the line between Otley and Ilkley.
The NER branch from Arthington was finished first, and the first train from Otley to Leeds, via Arthington, ran on 1 February 1865.
 The MR line from Apperley Junction and the joint line itself were completed a few months later and the first passenger train from Ilkley to Otley ran on 1 August 1865, freight services starting a year later, in October 1866.

The need to provide no disadvantage to travellers to and from Bradford gave the Midland some problems as the journeys involved reversing trains at Apperley Junction.
 To alleviate this the Midland sought powers to build a further line from Guiseley Junction (near Shipley) to Esholt Junction (near Guiseley).
 The line opened in December 1876 and the NER quickly negotiated running powers over the new section of line.
 This allowed the NER to run trains from Harrogate to Bradford without going via Leeds.

A final through connection to the joint line was made when the Midland Railway opened its Skipton—Ilkley line in 1888.
The towns of Otley and Ilkley both lie in Wharfedale and the early railway schemes passed the valley by.  An act of parliament had been obtained by the Lancashire & Yorkshire North Eastern Railway (incorporated as the Wharfdale [sic] Railway Company) in 1846 to build a line from Skipton through Ilkley and Otley to Arthington but the scheme failed as the company could not raise the necessary capital and was wound up in 1852.
A second proposal was made in 1856 for a company called the Wharfedale Railway to construct a line on the same route as that authorised in 1846, but the promoters of this scheme could get no support from the major companies (the MR and the NER) who operated the lines into which the Wharfedale Railway would connect.
Finally in 1860, following approaches from local representatives, the NER and the MR met and agreed to build a joint line between Otley and Ilkley.  The Midland Railway would make a connection with the new line by building a branch from the Leeds to Bradford line at Apperley Bridge to a junction at Burley in Wharfedale and the NER would build a branch from its Leeds to Harrogate line at Arthington to make an end-on connection with the new line at Otley.  The necessary parliamentary powers were granted in 1861 with the passing of two acts; the Midland Railway (Otley and Ilkley Extension) Act 1861 and the North Eastern Railway (Extension to Otley and Ilkley) Act 1861.  To obtain its Act the MR had to agree to demands from the residents of Bradford who felt aggrieved that with the construction of the line there would be two direct routes between Ilkley and Leeds (Ilkley—Guiseley—Leeds & Ilkley—Arthington—Leeds) and none between Bradford and Ilkley.  The act therefore stated that "equal facilities and advantages as regards trains and the conveyance and accommodation of passengers on the Railway shall be afforded to or from Bradford as those to or from Leeds".
Construction began in 1863 with The MR taking responsibility for building the line between Otley and Ilkley. The NER branch from Arthington was finished first, and the first train from Otley to Leeds, via Arthington, ran on 1 February 1865.  The MR line from Apperley Junction and the joint line itself were completed a few months later and the first passenger train from Ilkley to Otley ran on 1 August 1865, freight services starting a year later, in October 1866.
The need to provide no disadvantage to travellers to and from Bradford gave the Midland some problems as the journeys involved reversing trains at Apperley Junction.  To alleviate this the Midland sought powers to build a further line from Guiseley Junction (near Shipley) to Esholt Junction (near Guiseley).  The line opened in December 1876 and the NER quickly negotiated running powers over the new section of line.  This allowed the NER to run trains from Harrogate to Bradford without going via Leeds.
A final through connection to the joint line was made when the Midland Railway opened its Skipton—Ilkley line in 1888.
Otley and Ilkley Joint Railway