Among these were the War of the Union, a citizen revolt against the excesses of the monarchy, led by Valencia as the capital of the kingdom — and the war with Castile, which forced the hurried raising of a new wall to resist Castilian attacks in 1363 and 1364.