The history of rapid transit began in London with the opening of the Metropolitan Railway, which is now part of the London Underground, in 1863. By World War I, electric underground railways were being used in Athens, Berlin, Boston, Buenos Aires, Budapest, Glasgow, Hamburg, Istanbul, Liverpool, New York City, Paris, and Philadelphia.

In the 21st century, China became the world's leader by number of rapid transit systems as well as the fastest growth of such systems, and many other Asian countries began construction of their own rapid transit systems.

Development While smoke was a major problem for urban railways in tunnels, it was less of a problem in steam-hauled elevated railways, the first of which opened in New York City in 1870. In 1890, London's City & South London Railway used electric traction to overcome the issue of tunnel air quality. Electric traction was more efficient, faster and cleaner than steam and the natural choice for trains running in tunnels and proved superior for elevated services.

First tunnels Before any plans were made for transit systems with tunnels and stations, several railway operators had used tunnels for freight and passenger trains, usually to reduce the grade of the railway line. Examples include Trevithick's Tunnel in 1804, built for Wales' Penydarren locomotive, the 1829 Crown Street Tunnel at Liverpool, and the 1.13 mile (1,811 meter)-long 1836 Lime Street Tunnel, also at Liverpool. Part of this tunnel remains in use, making it the world's oldest active tunnel.

The first urban underground railway was London's Metropolitan Railway, which began operations on January 10, 1863. It was built largely in shallow cut and cover tunnels. It was worked by steam trains and despite the creation of numerous vents, was unhealthy and uncomfortable for passengers and operating staff. Smoke collected in the tunnels, leading to proposals to build pneumatic or cable-hauled railways to overcome this problem between 1863 and 1890, though none were successful. Nevertheless, its trains were popular from the start.

While not used for public transit their entire history, St. Louis, Missouri's former mainline tunnels are currently used for rapid transit. Constructed in 1875 they are the oldest in use rapid transit tunnels in North America.

The Metropolitan Railway and the competing Metropolitan District Railway developed the inner circle around central London that was completed in 1884. It featured an extensive system of suburban branches to the northwest (extending into the adjoining countryside), the west, the southwest and the east that was mostly completed by 1904. These systems eventually became part of the London Underground.

Electrification In 1890, the first electrified underground urban railway, City and South London Railway, opened. Since the tunnels were tubular, the term "tube" eventually became synonymous with the London Underground. It was originally planned to be cable-hauled, but the company contracted to supply cable-haulage technology went bankrupt. The railway company's authorising act of Parliament, the City of London and Southwark Subway Act 1884 (47 & 48 Vict. c. clxvii), specifically prohibited the use of steam power. This led the City and South to consider electric traction.Badsey-Ellis (2005), p36 It operated locomotive-hauled trains with three carriages, initially without windows, because it was thought that passengers would not need to know where they were if they were in tunnels.

The UK's only elevated electric railway opened in 1893 in Liverpool. The Liverpool Overhead Railway was the world's fourth metro system and the world's first fully formed elevated railway to run electric trains from the start. The LOR pioneered electric multiple units of three-car trains. Automatic electric light signals were also a first for the railway. The presence of the "El" helped Liverpool earn the nickname "Britain's North American City". The LOR was demolished in 1957 and Liverpool is served today by a partially underground urban rail network known as Merseyrail, which includes the former Mersey Railway which opened in 1886.

A major breakthrough in the development of electrically driven rapid transit occurred when the American inventor Frank J. Sprague successfully tested his system of multiple-unit train control (MUTC) on the South Side Elevated Railroad (now part of the Chicago 'L') in 1897. MUTC, which allowed all the motors in an entire train to be controlled from a single point, freed rapid transit systems from dependence on locomotive-hauled coaches.

Early systems

Europe

Istanbul's Tünel (F2) which was opened in 1875, second-oldest extant subterranean urban rail line in the world, after the London Underground (1863). It is thus the oldest surviving underground urban funicular rail line in continental Europe, as the older 1862 funicular line in Lyon has been converted into an underground road tunnel. It still operating from Beyoğlu to Karaköy with distance 0.5 km (0.3 mi). Istanbul's 1875 Tünel is sometimes described as an early subway system but is actually an underground funicular.

Budapest opened the first electrified underground line on the continent, the M1, in 1896. It ran from Gizella tér (now Vörösmarty tér, the city centre) to City Park and the local zoo, a distance of . It is now part of the Budapest Metro and has largely been restored. The M1 line became an IEEE Milestone due to the radically new innovations in its era: "Among the railway’s innovative elements were bidirectional tram cars; electric lighting in the subway stations and tram cars; and an overhead wire structure instead of a third-rail system for power." Car #18 is preserved at the Seashore Trolley Museum.

The Glasgow Subway in Scotland opened the same year and used cable haulage until it was electrified in 1935.

In 1898 the technically already outdated Vienna Metropolitan Railway in Vienna was opened, which was operated by steam trains. Three of the system's five lines were converted to a modern underground railway in 1978, the other two were integrated into Vienna's commuter rail system.

The first line of the Paris Métro opened in 1900. Its full name was the Chemin de Fer Métropolitain, a direct translation into French of London's Metropolitan Railway. The name was shortened to métro, and many other languages have since borrowed this word.

The Berlin U-Bahn (short for Untergrundbahn, underground railway) opened in 1902; because large sections of the line were elevated, it was also called "Hochbahn" (high railway) until the 1920s. Germany's second system, the Hamburg U-Bahn opened in 1912.

The Athens-Piraeus Electric Railway was built as a steam-hauled suburban line in 1869 and acquired an underground section in the capital in 1874. It was electrified in 1904 and became part of the Athens Metro in 2000 as Line 1.The system was completed by the construction of Lines 2 and 3 between 1992 and 2000.

North America

New York City built its first rapid transit line, the West Side and Yonkers Patent Railway, in 1868. The New York City Subway, which became one of the world's largest rapid transit systems, opened its first section in 1904, a fully independent four-track line stretching 9 miles (14.5 km) from City Hall to 145th Street. Extensions were soon built, reaching the Bronx and Brooklyn; this became part of the IRT system. Two major subway systems, operated by the BMT and the IND were constructed later, and many pre-existing elevated railway lines were incorporated into the BMT and IRT systems. The Hudson and Manhattan Railroad, which opened a subway tunnel in Manhattan in 1908 and connected with New Jersey, remained a separate railroad company, later coming under the control of the Port Authority of New York and New Jersey as the Port Authority Trans-Hudson (PATH). Some New York City Subway lines used right-of-way first used by railroads in the 1870s, and converted R44 subway cars run on the 1860 Staten Island Railway.

The first Chicago L, the South Side Elevated Railroad began operations in 1892, over tracks used by the Green Line over 125 years later. That system is unique for its extensive elevated structures, and several lines do not feature any subway sections.

The Tremont Street Subway was opened in Boston in 1897, becoming the first electrified subway tunnel in North America, and the third-oldest electrified subway tunnel still in use. Initially intended to ease streetcar congestion on Tremont Street, it now forms part of the MBTA Green Line

In 1907, the first line in Philadelphia, now part of the Market–Frankford Line, began running on both elevated and underground structures.

South America

The oldest subway in the Southern Hemisphere, "Subterráneos de Buenos Aires" (Subte), opened in 1913 as an underground tramway in Buenos Aires, Argentina. Line A of the Subte used La Burgeoise wood and metal carriages, which were in continuous operation for 100 years. In 2013 the cars were replaced with new rolling stock.

Later systems

Africa Cairo was the first African city with a metro system (opened 1987), which was partly converted from a railway line. It is under development. The second African metro opened in Algiers in November 2011. Tunis has a tram system that is referred to as a métro léger (meaning "light rail") despite not being rapid transit. Lagos and Abidjan are two other African cities that are also building metro networks.

Asia East Asia

Asia's first cities to have subway lines were Tokyo in 1927 and Osaka in 1933. Other major Japanese cities with subway systems are Yokohama, Sapporo, Kobe, Kyoto, Fukuoka, Nagoya and Sendai.

The first of many China's metro systems, Beijing subway, began operation in 1971. Other major cities followed: Tianjin (1984), Shanghai (1993), Guangzhou (1997), Wuhan (2004), Shenzhen (2004). Nearly sixty cities have or are planning rapid transit systems and new Chinese metro systems open every year.

In 1979, Hong Kong's subway line, the MTR, began operations. It operates 10 lines, including four that run underneath Victoria Harbour. By 1982, the British Section of the Kowloon-Canton Railway, known later as KCR East Rail and now MTR's East Rail Line, started to provide metro-like service as electrification was completed. In 2007 the merger of the KCR line into the MTR system was completed.

Since 1974, South Korean cities have developed subway systems. The first lines were converted from existing heavy railway lines. The largest, Seoul, operates twelve lines extending approximately 314 km. Busan, Daegu, Incheon, Daejeon and Gwangju also have subway systems. Seoul and Incheon are connected by metro.

Pyongyang in North Korea notably has a well adorned and deep metro with non-geographical names of stations (unique in the world) and was built to serve as a bomb shelter in case of a war.

In 1996, Taiwan opened its first metro system in Taipei. A second metro system opened in Kaohsiung in 2008.

South Asia India's oldest metro is in Calcutta (now Kolkata), which opened in 1984. the Kolkata Metro is the first planned and proposed rapid transit system of Asia, first proposed in 1919. Followed by the elevated rapid transit system, the Chennai MRTS. Delhi, Mumbai, Bengaluru, Chennai, Kochi, Hyderabad, Nagpur, Jaipur, Pune and Ahemdabad built metros afterwards. Cities such as Navi Mumbai are constructing metros. Patna and other cities have hired engineers and civil planners to plan the locations of future metro lines.

The Lahore Metro in Lahore, Pakistan opened in October 2020 with one line running south west–north east. It was the first automated and driverless rapid transit system in South Asia. The network currently has 26 stations (2 underground and 24 elevated) and is 27 kilometres long and is the first rapid transit line in Pakistan. Other lines of Lahore Metro are also planned.