During the brief period British rule over Java in 1811, rumours of plans by the Yogyakarta court to launch an attack against the British led to uneasiness among the Britons stationed in Java. On 20 June 1812, Sir Stamford Raffles led a 1,200-strong British force to capture the Yogyakarta kraton. The Yogyakarta forces, surprised by the attack, were easily defeated; the kraton fell in one day, and was subsequently sacked and burnt. The attack on the kraton was the first of its kind in Indonesian history, leaving the Yogyakarta court humiliated. The sultanate found itself involved in conflict again during the Java War.