From 1000 to 1400, the Arabian Peninsula is under fragmented rule, with Sunni and Shi‘i dynasties competing for control, especially of Mecca and Medina, until the Sunni gain the upper hand in the second half of the period. The east-west trade and annual pilgrimage continue to be important. Art and architecture are influenced by examples set in Baghdad and Cairo.