 The Nationalists advanced from their strongholds in the south and west, capturing most of Spain's northern coastline in 1937.They also besieged Madrid and the area to its south and west for much of the war.After much of Catalonia was captured in 1938 and 1939, and Madrid cut off from Barcelona, the Republican military position became hopeless.