Since landing in Calicut in 1498, the Portuguese started playing an influential role in Alappuzha. They began by spreading Catholicism and converting already existing Christians into Catholics. The famous St. Andrew's Basilica was built by them during this period. In the 17th century, as the Portuguese power declined, the Dutch gained a predominant position in the principalities of this district. They built many factories and warehouses for storing pepper and ginger, relying on several treaties signed between the Dutch and the Rajas of Purakkad, Kayamkulam and Karappuram. In course of time they also delved into the political and cultural affairs of the district. At that time Maharaja Marthanda Varma (1706–1758), who was the 'Maker of modern Travancore', intervened in the political affairs of those princedoms.