Because of the natural harbour, Chittagong had been an important location for trade, drawing Arab traders as early as the 9th century CE. The region fell under the rule of kings from Arakan in the 16th and 17th centuries, but later, the Mughal Army under Shaista Khan conquered Chittagong. During the 17th century, the region also faced a lot of attacks by Portuguese pirates.