The Muslims of Ternate began a holy war against the Portuguese and drew closer to the Muslim world. The Portuguese successfully converted the majority of the population, who drove out their Muslim rulers. The people of Ternate allied with the Muslims in Majapahit and Ayutthaya to drive out the Portuguese. The Spanish allied with the Portuguese to kill all the residents of Ternate who refused to become Christian.