<prompt> Translate the following text to EnglishMadrid ilibaki mikononi mwa Republican kwa sehemu kubwa ya vita, lakini serikali ilifutwa katika hatua za mapema za kuzingirwa kwa taifa ambalo liliendelea hadi Machi 1939.  <response>: Madrid remained in Republican hands for most of the war, but the government was evacuated in the early stages of a nationalist siege that lasted until March 1939. 