When the go-ahead was given to electrify the WCML northwards from Weaver Junction to Glasgow in the early 1970s, there was a requirement for more powerful traction to cope with the gradients north of Lancaster. An order was placed for 34 powerful, 5000hp Bo-Bo locomotives (later amended to 36 units) with electrical equipment from GEC. The Class 87s, as they were to become, were based closely on the preceding Class 86 (AL6) design in terms of equipment layout and overall appearance, but featured the loss of a route indicator box on the cab front, and two main windscreens replaced the three of all the earlier designs.
Prior to the construction of the fleet, three Class 86s were converted to Class 87 testbeds and numbered 86101-103. They featured the new BP7 bogies and Class 87 transformers, and had the 5000hp capability of an 87.
The locos were built by BREL Crewe between 1972 and 1974 with the first, 87001, entering traffic in June 1973 allocated to Willesden Depot in London. The fleet entered service gradually until the last 'standard' machine, 87035, was delivered in October 1974. The final locomotive, originally to be numbered 87036, but entering traffic as 87101, was built as a test bed for new electronic power control equipment, using thyristor technology to replace the tap-changer transformer and rectifiers. This loco appeared in 1975 and spent many months on test before entering regular use during 1976.
When new the fleet wore standard Rail Blue livery with full yellow ends. 87001 was the first of the class to be named, when it was fitted with the name 'STEPHENSON' in January 1976, the plates being presented by the Stephenson Locomotive Society. The following year, however, British Rail's naming policy changed and it was decided that the 87 fleet should become the new 'Royal Scot' class, with the locomotives named with an appropriate Anglo-Scottish theme. The 'STEPHENSON' plates were subsequently transferred to the Thyristor test loco, 87101, while 87001 became 'Royal Scot' in 1977. In 1984, 87006 and 87012 were selected to trial new liveries in advance of an improved 110mph service on the WCML. 87006 received a version of the large-logo livery, but with dark grey as the base colour rather than Rail Blue, while 87012 received a version of the APT-P livery, which became known as InterCity Executive livery. The latter scheme became the preferred option and the whole class (except 87101) received one or more versions of the InterCity colours in the pre-privatisation period.
Until the early 1990s, the 87s worked not only express passenger, but heavy freight services throughout the WCML area, regularly double heading steel and other commodities over the fells. Sectorisation eventually saw an end to this practice, with the InterCity sector gaining full control over the standard locos, and Railfreight taking on 87101. This loco received the railfreight Triple-Grey livery for a time in the early 1990s.
Following privatisation, the standard 87s became the property of Porterbrook Leasing and remained the principle motive power on Virgin West Coast services until 2003/2004, sharing duties with the Class 90s and some 86s. 87101 became the property of the English Welsh and Scottish Railway and saw use until 1998 when it was withdrawn.
With the introduction of new "Pendolino" units, 87s began to come out of traffic. 87016 had the dubious distinction of being the first 87/0 to be dismantled in November 2004.
2005 was the last year for intensive Class 87 use on passenger services, with a "Farewell" service operated on June 10th utilising a normal service train from Euston to Manchester, headed by 87010 and 87002. Meanwhile DRS took three locomotives on trial for freight use, however this was short-lived. GBRf also hired in locomotives to act as stand-by cover for Royal Mail trains.
The same year, both 87001 and 87035 were officially preserved, the former going to the National Railway Museum and the latter to Crewe Heritage Centre. 87031 was handed over to a training scheme at Tyseley.
Unexpectedly, in 2006, Virgin brought one Class 87 diagram back, covering for a shortage of Pendolinos. This London-Birmingham run lasted until 22nd December when 87002 hauled what turned out to be the very last 87-hauled scheduled passenger train.
Interest from abroad surfaced in 2006, resulting in 87012 and 87019 being exported in January 2007 to Bulgaria for trials with the Bulgarian Railway Company, an open-access freight operator there. In 2007 the only main-line UK use for the class was with GBRf who retained a handful of locos for mail standby duties; these ended on 27th December. A "Farewell" railtour planned for 29th December failed to run due to problems with the coaching stock, and with the deadline for non-OTMR-fitted locomotives passing on 31st December, the remaining 87s were withdrawn.
Following successful trials of 87012 and 87019, the Bulgarian Railway Company/Romic purchased the entire remaining fleet from Porterbrook leasing for export. Locos overhauled then exported to Bulgaria were 87007, 87008 and 87026 (June 2008), 87010, 87022 and 87028 (October 2008), 87003, 87006 and 87034 (December 2008), 87020, 87029 and 87033 (May 2009) and 87004, 87013 and 87014 (November 2009).
A deal was stuck to enable 87002 to remain in the UK for preservation, and it was handed over in April 2008. It was fitted with OTMR and main line registered, hauling its first test train on 16th July 2008.
A downturn in traffic in Bulgaria meant that the export deal was terminated in 2009, leaving 11 locos "in limbo". Those in worst condition (87011, 87018, 87021, 87027, 87030, 87031 and 87032) were sent for scrapping in 2010 and 2011. This left four - 87009, 87017, 87023 and 87025 - owned by Europhoenix Ltd.
Europhoenix started to prepare 87017 and 87023 for possible use in the UK, but the only interest was from Bulgaria in the form of open access freight operator Bulmarket. 87017 and 87023 (in working order) and 87009 and 87025 (not in working order) were exported by ship from Immingham in October 2012, accompanied by 86233 as a spares donor.
At the end of 2012 the only Class 87 locomotives remaining in the UK were 87001 (National Railway Museum), 87002 (operational) and 87035 (Crewe Heritage Centre).
87002 was used as part of the contract for the Caledonian Sleeper work from 2015 through to October 2019. With little prospect of further work for 87002 (and 86101), both were sold to Locomotive Services Ltd (LSL) in November 2019.