The Tallinn tram network (Trammiliiklus Tallinnas) is the only tram network in Estonia. Together with the four-route trolleybus network (et), the four tram lines (currently allocated into five routes), with a total length of 19.7 km (12.2 miles) arranged in a roughly cross-shaped layout, provide a backbone for the public transport network in the Estonian capital. All the routes meet up at Hobujaama in the city centre. Trams are unidirectional, one-sided and single-person operated, and much of the network runs on segregated track.
 The network is operated by Tatra KT4 and KTNF6 types (the latter being former KT4s that have been extended with the addition of a low-floor middle section) and, since 2014, CAF Urbos AXLs.
 The trams, trolleybuses and motorbuses in Tallinn are operated by the transport operator Tallinna Linnatranspordi AS. This enterprise emerged on 19 July 2012 when Tallinna Autobussikoondis, the motorbus company was merged with Tallinna Trammi- ja Trollibussikoondis.
 The first tramline in the city, which at that time and until 1917 was known as Reval, was opened in 1888 and was a horsecar line. The network was built using a 3 ft 6 in (1,067 mm) gauge, and it operated on the principal streets crossing the city, Narva Street, Pärnu Street and Tartu Street (Narva maantee, Pärnu maantee & Tartu maantee), using carriages imported from Belgium. By 1902 the total length of the lines in operation was 7.24 km (4.5 miles).
 In 1915, two local companies, the Russian-Baltic Shipyard and AS Böckler and Co., constructed a steam tramway in order to transport workers from the city centre to its factory at the city's Kopli quarter. This used a single track 1,524 mm (5 ft) gauge line, which made it suitable for also transporting heavy cargo to the harbour. The gauge used corresponded with the standard Russian gauge, and the passenger carriages used were of Russian provenance, purchased second-hand from Saint Petersburg. Later, the steam engines were progressively replaced with internal combustion units.
 During World War I, the horse-drawn trams ceased operation in 1918, leaving just the steam tramcars running to Kopli. The 1920 Treaty of Tartu signaled Soviet acceptance of Estonian independence, and on 13 May 1921 the rest of the Tallinn tram network reopened. Horses were made redundant, however, as all the tramcars were now modified to use petrol/gasoline engines. By then, only two horse-drawn carriages survived, and were in severe disrepair.
 On 28 October 1925, electric trams were introduced, initially on the line along Narva Street. A 600 V DC power supply was used. Six years later, the broad gauge track on the route to Kopli was replaced with 3 ft 6 in (1,067 mm) gauge, which was now standard across the network. After this, the line, which hitherto had been operated by a combination of steam- and petrol-powered trams, used only petrol-powered trams.
 By 1940, the city tram network extended to 13.4 km (8.3 miles), including the 5.1 km (3.2 miles) stretch of former steam tram track to Kopli. However, the return of war in 1939, and the savage conflict that followed the annexation of Estonia by the Soviet Union in 1940, put a stop to further development of the city's tram network.
 After the war, economic growth returned only slowly to the Estonian Soviet Socialist Republic; yet in 1951, the single-track line between the city centre and Kopli was doubled up to create a conventional two-way tram line, and in 1953 it was linked up with the rest of the network. 1954 saw the completion of a three-year project to build a tram depot at Vana-Lõuna, and a year after that, the stretch on Tartu Street (Tartu maantee) was extended to Ülemiste. Various further local developments followed. In 1970's tram routes were planned in Lasnamäe, in 1980's Laagna tee have been constructed for this purpose, but the new authorities discontinued this project after the fall of the USSR. On 1 September 2017, line 4 was extended to the airport.
 Discussions on future directions centered on the possibility of phasing out some of the city's motor-bus lines and extending the tram network. Instead of this, the city of Tallinn between 2010 and 2017 phased out three trolleybus lines (2, 6, 7, 9) and replaced them with motor-buses that are ostensibly environmentally friendly. The Paldiski mnt electric wires that supported trolleybus lines 6 and 7, were removed. Whilst railtracks for trams have been extended somewhat, commitments to extend the tram lines further are slow.
 In 2023, Tallinn had plans for five possible extensions to the network. The three priority extensions, Liivalaia, Järve and Pelgulinna, could be completed by 2025. 
 Following the start of electrification in 1931, the first electric tram cars were assembled in Tallinn using parts and sub-assemblies from Germany and Sweden. The first snow-plow came from Sweden in 1930. By 1940 the system was operating with 54 tramcars, of which 20 were electrically powered and nine were still petrol/gasoline powered. The other 28 were unpowered trailer units. Between 1951 and 1954 15 powered tramcars were assembled in the Tallinn depot along with 23 unpowered trailer cars.
 Between 1955 and 1964, 50 powered tramcars and 50 further unpowered trailer cars were delivered from the Gothaer Waggonfabrik rolling stock production facility in southern GDR (East Germany). Between 1965 and 1967, more Gotha G4 "bendy-tram" (hinged) tramcars were added to the fleet. Use of the Gotha G4 units continued till 1988.
 One Gotha G4 has survived, and is said to be the only intact unit in the world that can still be operated. This particular tram was at one time converted into a café and served as such. While the café stopped operations,[when?] the internal café layout remains to this day. The tram was then repainted with contemporary livery, christened "Pauliine", and can be rented for special rides.
 From the year 1973 on, Tallinn switched suppliers to ČKD Tatra of Prague in Western Czechoslovakia.
 By 1990, 60 Tatra T4 trams and 73 Tatra KT4 trams had entered service on the Tallinn network.
 After Estonia regained independence in 1991, procurement focused towards second-hand Tatra units. 13 KT4 trams came from the city of Gera, 6 from Cottbus, 16 from Erfurt and 1 from Frankfurt (Oder). In 2001, work had commenced on converting the KT4 fleet into KTNF6 upgrades through the addition of a low-floor middle-car. Whilst use of two-section T4 vehicles came to an end in 2005,[citation needed] then T4-based trams were until mid-2010s the only class that ran in Tallinn, and have remained the mainstay of the fleet well into 2010s.
 During the early part of the 21st century, there has also been a focus on enhanced maintenance schedules and the use of more robust replacement parts in order to extend the operating life of tram cars from 19 to 25–30 years.
 A new generation of trams for Tallinn was heralded, when Estonia sold some the country's carbon quotas to Spain, which in exchange specified that new and efficient trams be purchased. The multi-party deal involved the Spanish constructor CAF and required the delivery of 20 new low-floor trams by 2016. The first unit was delivered to the city at the end of 2014, and was thoroughly tested and adapted by February 2015. The CAF trams have known design problems that have not been solved since the adoption of the trams: the noise levels from the electric motors are exceptionally high and the trams noticeably lean from side to side during braking.
 Tallinn has ordered Pesa Twist trams to be delivered in 2024.
 As with all public transport in Tallinn, the tram network is free to use for residents of the city, senior citizens and those with disabilities, along with certain other groups. Journeys are paid for by buying an Ühiskaart smartcard at a kiosk. The card itself costs €2, after which funds can be loaded onto it and used to pay for tickets.
 Additionally, those eligible for discounted tickets may purchase a one hour ticket for 75 cents, or a thirty day ticket for €13.
 The network reached its present extent of 39 km (24 mi) single track (each stretch counted twice) in 1990[citation needed].
 The number of tramcars on the system peaked at 135 in 1985 and fell slowly during the rest of the twentieth century. The rate of decrease accelerated during the first part of the present century with a decline from 125 tramcars in 2000 to 85 in 2009. The recorded number of passenger journeys fell very much more sharply, from a peak of 105.9 million in 1990 to 25.2 million in 2009.