Before the founding of Baghdad, one of the largest and most important towns in Iraq. It was founded as a garrison by the caliph Omar I in 638. In 749, it served briefly as the capital of the Abbasids, before they founded Baghdad. Kufa became a large commercial and intellectual center, but a series of incursions by the Qarmathians caused extensive damage and by the 14th century it was almost deserted. The mosque, built in 670, was a stone structure with columns 15 meters high supporting the roof without the use of arches.