The Republic of Venice owned the city between 1420 and 1797 as part of the Venetian Albania. The city's sixteen Baroque palaces were mostly built in this period, as were its seventeen Catholic churches and two Orthodox churches. The old city does not have a defensive wall, but instead it has nine defensive towers, the most important of which is the tower of the Holy Cross. These were built by the navy of the Venetian Republic in the 15th and 16th centuries.

The prominent Serbian Baroque poet and theologian Andrija Zmajević (1628-1694) was a native of Perast. On 15 April, 1654 an Ottoman force from Herzegovina under the leadership of Mehmed-pasa Rizvanbegović assaulted Perast; Andrija's brother Krsto heroically defended the city. Andrija wrote a poem "Boj peraški" (Battle of Perast) dedicated to celebrating this event. Some half a century ago the last remaining copy of this work was lost. Perast was at its peak in the 18th century under the Venetian Republic, when it had as many as four active shipyards, a fleet of around one hundred ships, and 1,643 residents. At that time the most beautiful buildings arose in this fortified town. Many ornate baroque palaces and magnificent dwelling-houses decorated the town of Perast, full of typical Venetian architecture[2]. The population has since decreased to 430 in 1910 and around 360 today. The fleet was dissolved by the rise of the steam engine.

At the fall of the "Serenissima" (1797) Perasto was the last city of the Republic to lower the Venetian flag. On 12 May 1797, the Republic of Venice ended, but a few places in the Albania Veneta for several months still continued to remain loyal to the Venetian Republic: Perasto was the last place of the Republic to surrender. On 22 August 1797 the Count Giuseppe Viscovich, Captain of Perasto lowered the Venetian flag of the Lion of Saint Mark pronouncing the farewell words in front of the crying people of the city and buried the "Gonfalon of Venice" under the altar of the main church of Perasto (Listen the song "Perasto 1797" by Luciano Brunelli).

From 1941 to 1943 during World War II, after Benito Mussolini had annexed the territories around Kotor to the Kingdom of Italy, Perasto returned under the influence of Venice and the area was part of the Italian Governorship of Dalmatia (it was called "Provincia di Cattaro"). After 1945, Perast was restored to Yugoslavia, and it has been part of Montenegro since its independence in 2006.