Dieselisation
Weighing against the cost of, and inertia against, replacing the large investment that railroads had in existing steam power were the dramatic increases in flexibility and efficiency with diesel. The fastest and most powerful steam locomotives were faster and more powerful than diesels; however, their range of efficient operation was severely limited. Diesels pro-rate their fuel usage to the length of trains, which a steam engine cannot do. Multiple-unit diesel power is scalable to power requirements with one locomotive crew; steam power is not. A high speed Hudson steam locomotive is good for only one situation, high speeds on level grades. The diesel locomotive can be operated by a single person, with no need of a fireman to run the boiler (two person cab crews may be required for other reasons). Also, diesels use much less fuel and no manpower when idling, something locomotives often do. Diesels can be parked running for days unattended, whereas steam engines must be constantly tended to if not completely shut down. Bringing a steam engine boiler up to operating temperature is often regarded as both an art and science, requiring much training and experience. A diesel is much simpler to start and shut down.
Steam locomotive
In Spain, the first electric trains were introduced en 1911, and the first diesels in 1935, just one year before the Spanish Civil War. National railway company (Renfe) operated steam locomotives until 9 June 1975.