Brunei territorial losses from 1400 to 1890 Brunei briefly rose to prominence in Southeast Asia when the Portuguese occupied Malacca and thereby forced the wealthy and powerful but displaced Muslim refugees there to relocate to nearby Sultanates such as Aceh and Brunei. The Bruneian Sultan then intervened in a territorial conflict between Hindu Tondo and Muslim Manila in the Philippines by appointing the Bruneian descended Rajah Ache of Manila as admiral of the Bruneian navy in a rivalry against Tondo and as the enforcer of Bruneian interests in the Philippines. He subsequently encountered the Magellan expedition wherein Antonio Pigafetta noted that under orders from his grandfather the Sultan of Brunei, Ache had previously sacked the Buddhist city of Loue in Southwest Borneo for being faithful to the old religion and rebelling against the authority of Sultanate. However, European influence gradually brought an end to Brunei's regional power, as Brunei entered a period of decline compounded by internal strife over royal succession. In the face of these invasions by European Christian powers, the Ottoman Caliphate aided the beleaguered Southeast Asian Sultanates by making Aceh a protectorate and sending expeditions to reinforce, train and equip the local mujahideen. Turks were routinely migrating to Brunei as evidenced by the complaints of Manila Oidor Melchor Davalos who in his 1585 report, say that Turks were coming to Sumatra, Borneo and Ternate every year, including defeated veterans from the Battle of Lepanto. The presence of Turks assisting Brunei against Habsburg Spain, makes the subsequent Castille War a part of the Ottoman–Habsburg wars.