The town walls of Piran were first mentioned in the 7th century when they were reportedly built around the old town center in Punta. From there, the walls gradually extended toward the mandrac (harbor), incorporating new districts that developed outside the initial fortifications. Due to the town’s expansion and the need for defense against external threats, a second and third section of the walls were constructed, complete with defensive towers. The most extensive preserved section of these historic fortifications is found on the slopes of Mogoron Hill, forming the town’s distinctive skyline.
Piran has preserved seven town gates, which once served as entrances through the walls: Milje Gate, Dolfin Gate, Field Gate, Baroque Gate of St. George, Marčana Gate, First Rašpor Gate, and Second Rašpor Gate. Among them, Milje Gate is one of the oldest surviving entrances. The best-preserved Gothic gate, dating back to the 15th century, was commissioned by the mayor at the time, after whom it was named. Dolfin Gate is easily recognized by its distinctive coat of arms featuring three dolphins.