In 1684, following the Ottoman defeat at the second Siege of Vienna, Venice joined the Holy League and declared war on the Ottoman Empire. Under the leadership of Francesco Morosini, who had led the defence of Candia, the capital of Crete, the Venetians took advantage of the Ottoman weakness and rapidly took over the island of Lefkada (Santa Maura) in 1684. In the next year, Morosini landed on the Peloponnese, and within two years, aided by the local Greek population, took control of the peninsula and its fortresses. A subsequent Venetian campaign into eastern Continental Greece succeeded in capturing Athens, but failed before the walls of Chalkis (Negroponte). Thereafter the conflict degenerated into a stalemate, with raids and counter-raids on both sides, until the signature of the Treaty of Karlowitz between the Ottomans and the Holy League, which in Greece left the Morea, Leucas and the island of Aegina in Venetian hands.