Germany has an extensive number of tramway networks (Straßenbahn in German). Some of these networks have been upgraded to light rail standards, called Stadtbahn in German. Straßenbahn and Stadtbahn schemes are usually operated on the legal foundation of the BOStrab, the Tramways Act of Germany.
The Stadtbahn is a concept dating back as far as the late 1940s, when city councils were considering Unterpflasterstraßenbahn (lit. below-pavement tramways) as part of rebuilding the city centres devastated by World War II. Some cities, like Hanover, reserved extra wide medians in their city's ring roads, though in most cities these plans never made it past the planning stage. However, seeing the success of the Berlin and Hamburg U-Bahn systems, cities started considering such schemes again in the 1960s and 1970s. Munich and Nuremberg decided to fully abolish their trams and started constructing a full-scale U-Bahn system (although to date, neither of these has abolished their tram system and likely never will - both are in fact expanding their tram systems) whilst other cities, like Hanover or Stuttgart, went for a scheme of city centre tunnels and special right-of-way arrangements with the prospect of converting their tramway networks to a full-fledged U-Bahn over several decades. By the 1980s, however, virtually all cities had abolished these plans due to the high costs involved with converting the tramways, and the most common Stadtbahn systems now are a mixture of tramway-like operations in suburban and peripheral areas, and a more U-Bahn like mode of operation, featuring tunnel stations, in the city centres.
The Stadtbahn scheme is not to be confused with the S-Bahn, which commonly is a suburban railway operating under the Railways Act, while the Stadtbahn typically is an urban railway operating under the Tramways Act.