The Selby Diversion is a mainline railway in the United Kingdom, built as a new part of the East Coast Main Line (ECML) to avoid an area of potential subsidence over the newly discovered Selby Coalfield. The line opened in 1983, running roughly northwest from a junction on the ECML near Temple Hirst, south of Selby, to a junction near Church Fenton, south of York.