The EMD SD40-2 is a diesel-electric locomotive built by EMD from 1972 to 1989. The SD40-2 was introduced in January 1972 as part of EMD's Dash 2 series, competing against the GE U30C and the MLW M630. Although higher-horsepower locomotives were available, including EMD's own SD45-2, the reliability and versatility of the 3,000-horsepower SD40-2 made it the best-selling model in EMD's history. The SD40-2 was an improvement over the SD40, with modular electronic control systems similar to those of the experimental DDA40X.
Peak production of the SD40-2 was in the mid-1970s. Sales of the SD40-2 began to diminish after 1981 due to the oil crisis, increased competition from GE's Dash-7 series and the introduction of the EMD SD50, which was available concurrently to late SD40-2 production. The last SD40-2 delivered to a United States railroad was built in July 1984, with production continuing for railroads in Canada until July 1985, Mexico until February 1986, and Brazil until October 1989. As of 2013, nearly all units remain in service.