The role of the capital was taken over by Tunis in the 12th century during the Almohad era, which it remained during the Hafsid Dynasty. Some buildings still exist from the 10th and 11th centuries, such as the Great Mosque and the Casbah, which have helped make the city an important tourist attraction. Later the city was subject to many raids. In 1390 it was the target of the Barbary Crusade, when a French army laid siege to the city but failed to take it.