The tramway in Piran was a public transport system that connected the Tartini Square with the railway station in Lucija.

Summary
At the end of the nineteenth century, Piran had a population of around 12,700 people (around three times more than today). It was also one of the largest cities in Istria and was an important shopping district. The municipality was concerned that Piran was able to fall into a decline if the most important transport links avoided the city, so the municipality strived to get a new narrow gauge railway connecting Trieste and Poreč to include a stop in Piran. Nevertheless, the terrain did not allow for such a development, so Piran instead got a revised stop around three miles away from the nearby town of Lucija. When this narrow gauge railway opened in 1902, the municipality asked the Royal Ministry of Railways of the Austro-Hungarian empire at the time to grant their request to open either a horse-powered or an electric-powered tramway between Piran and Lucija to support the growing number of visitors to Piran due to the new railway link. While the municipality waited for the request to be approved, they temporarily ran horse-drawn chariots which were unsuitable due to the Macadam roads at the time.

Trolleybus line

The Royal Ministry of Railways did not responded to Piran's request, however in 1907, the municipality found out that the town of Gmünd successfully set up the first trolleybus line in the Austro-Hungarian empire. Since the municipality would not need the permission of the empire to build a trolleybus line, the city briskly began construction on one. The trolleybus line opened on the 24th of October 1909. The electricity for the trolleybuses was generated at a thermal power plant situated in the dockyards of Portorož that had already existed before the trolleybus line as it was built by Francesco Apollonio thirty years beforehand. The trolleybuses were an uncomfortable and unreliable solution to Piran's transport problem as their poles often disconnected and had to be put back up while the trolleybuses overtook vehicles or ran in storms. This is why they were withdrawn after only two years of operation as the Royal Ministry of Railways finally responded to the municipality's request.

Tramway
On the 11th of September 1911, the municipality found out that the Royal Ministry of Railways approved the construction of a tramway linking Piran with Lucija. This meant the tramway's construction could begin. The trolleybus line's operation was immediately halted and a company based out of Augsburg began building the tracks on the previous trolleybus route. The track gauge was set to 760mm, identical to the gauge used on the new narrow gauge railway. The trolleybus line's overhead wire support poles were reused in the construction of the tramway's overhead wires. The construction of the tramway cost 150,000 krone that was paid for by the Municipality of Piran and other communities in Istria. The full length of the line was equivalent to 3.4 miles with five passing places. The route was mostly flat with the exception of a 35% incline at the Lucija terminus. A bridge over the River Fasano also had to be strengthened.

The line opened on the 20th of July 1912. The municipality purchased five trams and two unpowered trailers in red liveries. The municipality also purchased a truck for the maintenance and upkeep of the line's overhead wires. The trams ran at a half-hourly interval and could reach up to 16 mph. The tramway was still powered by the thermal power plant in the Portorož dockyards, only that the steam engine was replaced by a pair of diesel generators as the trams needed a far higher electrical input. When the Kingdom of Italy closed the narrow gauge railway linking Trieste with Poreč, the yearly passenger figures decreased significantly. Despite the severe drop in passenger figures, the tramway continued to run. Only after the second World War did the Free Territory of Trieste decide to close the tramway as its passenger figures were not looking very good when compared to Piran's bus traffic's figures. The last tram completed its journey on the 31st of August 1953. The usable trams were transferred by boat to the Dalmatian seaside town of Poleč in Croatia before being transferred to Sarajevo, the capital of Bosnia, until the 1960s when they were scrapped. The tramway's tracks weren't all torn up immediately, and large fragments of them were still visible into the 1960s.

Trams 
The trams and unpowered trailers were built in Graz while the electrical equipment was built by Vienna-based company Siemens & Halske, that is nowadays known as simply Siemens. The trams weighed 8700kg and were 8580mm long. They could fit up to forty passengers (twenty seated, twenty standing). They were capable of reaching 16mph.

See also
Trolleybuses in Piran
Trams in Ljubljana

Piran
Tram transport in Slovenia
1912 establishments in Austria-Hungary
1953 disestablishments in Europe
Piran