Kozhikode is bounded on the north by Kannur district, on the south by Malappuram district, on the east by Wayanad district and on the west by the Arabian Sea. As the Zamorin became the ruler of Kozhikode, Kozhikode gained prominence as a commercial center with the help of the Arabs. Thus the Zamorin became the ruler of the region up to Kochi. Many aristocrats fled to the south for fear of conversion and persecution. Tipu Sultan brought in laws to stop many of the customs that existed here, such as polygamy, polyandry, and the power to change. The portion was entrusted to people from wealthy affluent families. Over time, the district was further divided into Malappuram and Wayanad districts.