Despite the advent of electric and diesel locomotives in the mid-20th century, steam locomotives continued to be used and constructed into the 21st century.
Steam locomotives constructed in the 21st century fall into two broad categories: those that use advanced steam technology to be commercially competitive with diesels; and those built to more traditional designs for hauling tourist trains. Even locomotives in the second case likely use some modern methods and materials. These include welded boilers, to simplify construction, and roller bearings to improve reliability. For safety reasons, asbestos is not used for boiler lagging and is replaced by other materials, such as glass fibre. If the locomotive runs on main lines, safety systems such as the Train Protection & Warning System (TPWS) and an On-Train Monitoring Recorder (OTMR) must be fitted.