 In 1267, King James I of Aragon conceded it "fuero" rights, but four years later Count Ponç IV of Empúries set the town on fire.During the Spanish Civil War, it remained loyal to the Republican government, and was repeatedly bombed by the Nazi and Fascist Italian aviation.It was one of the most heavily bombed Catalan cities during the Civil War, in 1938, and, especially, at the beginning of 1939, when thousands of people passed through the town on their way into exile.