Why did the spanish locate their capitals inland