Southern Pacific Company's MM-2 class of steam locomotives was one of Southern Pacific's (SP) only classes of 2-6-6-2 locomotives ordered and built as oil-fired cab forward locomotives. They were built in 1911 as compound-expansion Mallet locomotives by Baldwin Locomotive Works and entered service on SP beginning September 19, 1911. By 1914, they had all been upgraded with an additional leading axle making them 4-6-6-2 locomotives, reclassified from MM-2 to AM-2. This was done to improve handling at speed. These locomotives were the predecessors of several other cab-forward engines, culminating in the AC-12 class cab forward locomotives built during World War II.
SP used these locomotives in the Sierra Nevada for about 20 years, retiring them in the mid-1930s. They were stored in the railroad's Sacramento, California, shops for a couple years before being rebuilt with 4B Worthington feedwater heaters and uniform cylinders (making them simple-expansion them) measuring 22 in × 28 in (559 mm × 711 mm), diameter × stroke. The rebuilds increased the class weight to 424,200 lb (192,400 kg) with 356,900 lb (161,900 kg) on the drivers, 210 psi (1.4 MPa) boiler pressure and 76,800 lbf (342 kN) tractive effort.
The rebuilt locomotives were renumbered into the 3900 series then used on SP's Portland Division in Oregon until they were again retired in the late 1940s. The locomotives were all scrapped soon after retirement with the last, 3907 (originally 4207), on September 23, 1948.