San Francisco in 1945. In 1947, India gained its independence and was partitioned into the Dominion of India and the Dominion of Pakistan, the latter of which was created as a homeland for colonial India's Muslims. Portuguese Long after the decline of the Roman Empire's sea-borne trade with India, the Portuguese were the next Europeans to sail there for the purpose of trade, first arriving by ship in May 1498. The first successful voyage to India was by Vasco da Gama in 1498, when after sailing around the Cape of Good Hope he arrived in Calicut, now in Kerala. Having arrived there, he obtained permission from Saamoothiri Rajah to trade in the city. The navigator was received with traditional hospitality, but an interview with the Saamoothiri (Zamorin) failed to produce any definitive results. Vasco da Gama requested permission to leave a factor behind in charge of the merchandise he could not sell; his request was refused, and the king insisted that Gama should pay customs duty like any other trader, which strained their relations. The ruler of the Kingdom of Tanur, who was a vassal to the Zamorin of Calicut, sided with the Portuguese, against his overlord at Kozhikode. As a result, the Kingdom of Tanur (Vettathunadu) became one of the earliest Portuguese allies in India. The ruler of Tanur also sided with Cochin. Many of the members of the royal family of Cochin in 16th and 17th members were selected from Vettom. However, the Tanur forces under the king fought for the Zamorin of Calicut in the Battle of Cochin (1504). However, the allegiance of the Mappila merchants in Tanur region still stayed under the Zamorin of Calicut. Francisco de Almeida was appointed Viceroy of India in 1505. During his reign, the Portuguese dominated Kochi and established a few fortresses on the Malabar Coast. The Portuguese suffered setbacks from attacks by Zamorin forces in South Malabar; especially from naval attacks under the leadership of Kozhikode admirals known as Kunjali Marakkars, which compelled them to seek a treaty. The Kunjali Marakkars were credited with organizing the first naval defence of the Indian coast. Tuhfat Ul Mujahideen written by Zainuddin Makhdoom II (born around 1532) of Ponnani in 16th-century CE is the first-ever known book fully based on the history of Kerala, written by a Keralite. It is written in Arabic and contains pieces of information about the resistance put up