European influence gradually brought an end to this regional power. Later, there was a brief war with Spain, in which Brunei was victorious. The decline of the Bruneian Empire culminated in the 19th century when Brunei lost much of its territory to the White Rajahs of Sarawak, resulting in its current small landmass and separation into two parts.