 He had come to make a treaty with the Zamorin of Calicut and to set up a Portuguese factory in the city.But he was not successful and there was conflict between the local Arab merchant guilds.The Portuguese factory was overrun in a riot and almost 70 Portuguese were killed.