In 1526, under the viceroyship of Lopo Vaz de Sampaio, the Portuguese took possession of Mangalore. The territory included parts of Dakshina Kannada and Udupi in Karnataka state, and Kasaragod in Kerala state (South Canara). Mangalore was named the islands of "O Padrão de Santa Maria"; later came to be known as St. Mary's Islands. In 1640, the Keladi Nayaka Kingdom defeated the Portuguese. Shivappa Nayaka destroyed the Portuguese political power in the Kanara region by capturing all the Portuguese forts of the coastal region.