The Grand Harbour was the base for the Order of Saint John for 268 years, from 1530 to 1798. They settled in the city of Birgu and improved its fortifications, including rebuilding the "Castrum Maris" as Fort Saint Angelo. In July 1551, Barbary corsairs and Ottoman forces raided Malta. They landed at Marsamxett and marched upon the Grand Harbour, but did not attack as they found the town of Birgu too well fortified to attack. Although this attempt was unsuccessful, the Ottoman force later managed to sack Gozo and conquer Tripoli within the same campaign. After the attack, Fort Saint Elmo and Fort Saint Michael were built to better protect the harbour in any future attacks. The city of Senglea was also founded soon afterwards.