The Great North and Highland had agreed in 1865 that traffic between the two railways would be exchanged at Keith, but in 1886 the GNoSR had two lines to Elgin that, although longer than the Highland's direct line, served more populous areas.