In 1762 the city was captured and then occupied by Great Britain for two years as part of the Seven Years' War. The city remained the capital of the Spanish East Indies under the government of the provisional British governor, acting through the Archbishop of Manila and the Real Audiencia. The Spanish military regrouped at in Pampanga and continued to harass the British.