Mengre, had talks with Janus' representative Giorgio Billi which ended in an agreement by which the cities remained under Genoese hands. Later, he forced the Cypriot people to pay special taxes to assemble an army and siege machines, and he besieged Famagusta for three years but in vain, since there was access from the sea to the city. In 1406 the siege ended and the Genoese tried to occupy Limassol, but were defeated. Two years later, the island was affected by epidemics. Simultaneously, there were many raids of locusts on the island, which caused destruction to agriculture. A new epidemic arrived in 1419–20, which probably caused the death of Janus' second wife, Charlotte on 15 January 1422. Because the king was very distraught about her death, the body of the dead queen was moved out of the palace where her funeral was, in order to not be seen by Janus. Meanwhile, because Cyprus was still a permanent base of campaign for pirates and adventurers, after raids around the Cypriot coasts, Janus had repeated discussions with the Sultan of Egypt via the sultan's representatives. Janus was unable to stop the raids, which gave the Muslims a reason to attack Cyprus. Cypriot nobles and officials of the kingdom participated in the raids. Barsbay, the Sultan of Egypt, sent military forces to Cyprus several times. A small force, around 1424, attacked Limassol, and in 1425 the Egyptian army attacked Famagusta and then pillaged Larnaca together with the nearby area, including Kiti, Dromolaxia, Kellia, Aradippou and Agrinou. After Larnaca, they went to Limassol, which was also sacked, including the city's castle. In the summer of 1426, the Mamluks launched a large-scale attack against the island. Led by Tangriver Mohamed and Inal el Kakimi, their army contained over 3,000 men and included Mamliks, Turks and Arabs and arrived at the island with 180 ships near Avdimou. Limassol was again occupied. Janus mustered his army and moved from Nicosia to Limassol. He asked in vain for help from the forces in Europe: the Genoese were his enemies, and the Venetians and others did not want to destroy commercial relations with the sultan. Following the Battle of Chirokitia (7 July 1426) against the Mamluks, King Janus was captured by the Egyptian forces. He was ransomed after ten months of captivity in Cairo. During his captivity his brother Hugh of Lusignan, Archbishop of Nicosia, took charge of Cyprus.