The Venetian walls in the old harbour of Heraklion, Crete

The fortifications of Heraklion are a series of defensive walls and other fortifications which surround the city of Heraklion (formerly Candia) in Crete, Greece. The first city walls were built in the Middle Ages, but they were completely rebuilt by the Republic of Venice. The fortifications managed to withstand the longest siege in history for 21 years, before the city fell to the Ottomans in 1669.

Heraklion's fortifications have made it one of the best fortified cities in the Mediterranean. The walls remain largely intact to this day, and they are considered to be among the best preserved Venetian fortifications in Europe.

The first fortifications in what is now Heraklion were built by the Byzantine Empire. The city was captured by Arabs in 824, and it became the capital of the Emirate of Crete. At this point, they built a wall of unbaked bricks around the city, and surrounded it by a ditch. The new capital became known as Rabdh al-Khandaq (Trench Castle).

Meanwhile, the Byzantines tried to recapture Crete from the Arabs because of its strategic importance. After several unsuccessful attempts, Nikephoros II Phokas managed to take the island in 961. The Arab fortifications were razed, and a new fort known as Rokka was constructed instead. Eventually, the settlement grew, and the Byzantines built new walls on the site of the Arab walls.

Some remains of the Byzantine walls still exist near Heraklion's harbour.

In the early 13th century, Candia (modern Heraklion) and the rest of Crete fell under the control of the Republic of Venice. Initially the Byzantine walls remained in use, and they underwent various modifications. Following the fall of Constantinople in 1453, the expanding Ottoman Empire became a major threat for the Venetians. Due to this threat and the discovery of gunpowder, they decided to build new fortifications around Candia. Construction began in 1462, and the walls took over a century to be built.

Over the years, the fortifications were strengthened with the construction of various outworks, while the Rocca al Mare (now known as the Koules Fortress) was built to protect the harbour entrance.

The fifth Ottoman–Venetian War broke out when the Ottoman Navy arrived off Crete on 23 June 1645. By August, Canea fell to the Ottomans, while the Fortezza of Rethymno fell in 1646. However, the Venetian garrison in Candia managed to hold out for 21 years, and the Siege of Candia remains the longest siege in history. The city surrendered in 1669, and the Venetians and most of the population were allowed to leave peacefully, sparing the city from being sacked.

After occupying the city, the Ottomans repaired and maintained its fortifications. The bastions were given Turkish names, for example Martinengo Bastion became Giouksek Tabia.

The Ottomans also built a small fort known as Little Koules on the landward side close to the Rocca al Mare. This was demolished in 1936 while the city was being modernized.

The walls were damaged by German aerial bombardment during the Battle of Crete in World War II, but the damage was repaired. After the war, some of the outworks were demolished to make way for modern buildings, and suggestions were also made to demolish the entire city walls. The demolition was never carried out, and the walls remain largely intact, being among the best preserved Venetian fortifications in Europe.