Until the middle of the 20th century, trains in Portugal were hauled by steam locomotives, with the exception of the Cascais Line. Despite some experiments before the Second World War (1939 1945), diesel traction was only introduced in the country after the end of the war, with the help of funds received through the Marshall Plan, an American initiative to provide financial support to Western Europe.
The CP 1500 series was to replace steam locomotives. They began work hauling passenger services on the Northern Line, but were also used on freight trains. Among the various fast trains on the Northern Line, the Algarve and the Alentejo, the famous Flecha de Prata (Silver Arrow) is notable. The Flecha de Prata became iconic because it greatly reduced the travel time between the two cities (being the predecessor of the Foguete or the modern Alfa) and because of the silver coaches. With electrification of the Northern Line, many of these locomotives were transferred to the South and West lines. They were modernised from 1970 to increase their power. At the end of 2000, they were withdrawn from commercial service. CP 1501 was named “Almeida e Castro”, in honour of the engineer who introduced diesel traction to Portugal.