Where Preveza is now located, once stood a city founded in 290 BC by the king of Epirus Pyros and named Berenice, by his mother-in-law, wife of the Egyptian ruler Ptolemy I. In 31 BC, the battle of Actium took place and Octavian founded the city of Nikopolis to honor his victory. In the later medieval period a new city was founded called Preveza and in 1499 this city passed into the hands of Venice. In 1538 an important battle, the Battle of Preveza, took place near the city, between an Ottoman fleet and a Christian alliance assembled by Pope Paul III. A year earlier, a large Ottoman fleet under the command of Barbarossa Hajreddin Pasha occupied a number of Aegean and Ionian islands belonging to the Republic of Venice, thus annexing the Duchy of Naxos to the Ottoman Empire. In the face of this threat, Pope Paul III assembled a "Sacred Union" to confront Barbarossa. The battle ended with the defeat of Venice and the signing of a treaty in 1540, according to which the Turks acquired control of the former Venetian islands in the Aegean, the Ionian and the eastern Adriatic. In 1684, the Venetians recaptured Preveza until 1699, when it was awarded to the Turks by Karlovic's peace treaty. This completed the Austrian-Ottoman War of 1683-1697, in which the Ottoman side was finally defeated in the battle of Senta. The treaty marked the beginning of Ottoman decline in Eastern Europe and the Habsburg Monarchy became the dominant power in Central Europe. The battles between Venice, Austria and the Ottoman Empire continued during the first years of the 18th century. After the defeat of the Ottoman forces in Petrovaradin by the Austrian troops, the Treaty of Pasarovic was signed. According to this, Venice would only keep the Ionian Islands. In 1797, with the Treaty of Campo Formio, the city passed into the hands of the French, but the following year, the French forces were expelled by Ali Pasha of Ioannina. Preveza joined the New Greek State in 1912 with the rest of Epirus.