Complex sentence: The rulers of Gujarat (Mahmud III, nephew of Bahadur Shah) also tried to take control of the fort in 1545 AD and 1546 AD but these were repeatedly thwarted by the Portugese under the military leadership of Dom Joao Mascarenhas and Dom Joao de Castro.
Split into simpler sentences: The rulers of Gujarat (Mahmud III, nephew of Bahadur Shah) also tried to take control of the fort in 1545 AD and 1546 AD. However they were repeatedly thwarted by the Portuguese under the military leadership of Dom Joao Mascarenhas and Dom Joao de Castro.