After the victory of the Bourbons at the Battle of Almansa on 25 April 1707, the English army evacuated Valencia and Philip V ordered the repeal of the privileges of Valencia as punishment for the kingdom's support of Charles of Austria.