By 177 BC, Trieste was under the control of Roman Empire. Trieste was granted the status of a colony under Julius Caesar. It was also he that recorded its name as Tergeste in his Comentarii di bello Gallico in 51 BC.
During the Middle Ages, Trieste grew into an important port and trade hub. Its role as the principal Austrian commercial port was emphasized by the construction of the Vienna-Trieste Railway, completed in 1857. By the end of the 19th century, Trieste was a buzzing cosmopolitan city, frequented by artists such as James Joyce and Italo Svevo.
In 1921, after the end of World War I and the disintegration of Austria-Hungary, Trieste became a part of Italy. After World War II, in 1947, Trieste became the capital of the Free Territory of Trieste. When that state was dissolved in 1954, it reverted back to Italy.