The Fourth Ottoman-Venetian War, also known as the War of Cyprus  was fought between 1570 and 1573. It was waged between the Ottoman Empire and the Republic of Venice, the latter joined by the Holy League, a coalition of Christian states formed under the auspices of the Pope, which included Spain , the Republic of Genoa, the Duchy of Savoy, the Knights Hospitaller, the Grand Duchy of Tuscany, and other Italian states. The war, the pre-eminent episode of Sultan Selim II's reign, began with the Ottoman invasion of the Venetian-held island of Cyprus. The capital Nicosia and several other towns fell quickly to the considerably superior Ottoman army, leaving only Famagusta in Venetian hands. Christian reinforcements were delayed, and Famagusta eventually fell in August 1571 after a siege of 11 months. Two months later, at the Battle of Lepanto, the united Christian fleet destroyed the Ottoman fleet, but was unable to take advantage of this victory. The Ottomans quickly rebuilt their naval forces, and Venice was forced to negotiate a separate peace, ceding Cyprus to the Ottomans and paying a tribute of 300,000 ducats.
Question: What happened first, the rebuilding of Ottoman naval forces, or the ceding of Cyprus?
Answer: rebuilding of Ottoman naval forces