Mary Stewart was born on 17 September 1916 in Sunderland, County Durham, England, UK, daughter of Mary Edith Matthews, from New Zealand, and Frederick Albert Rainbow, a vicar. She graduated from Durham University in 1938 with first-class honours in English, was awarded a first-class Teaching Diploma in English with Art the following year and in 1941 gained her master's degree. The scarcity of jobs during World War II meant that she held a variety of posts during this period, including primary school teaching, teaching at secondary level at a girls' boarding school, and working part-time both at the Sixth Form of Durham School and as a temporary lecturer in the English Department at Durham University. She received an honorary D.Litt. in 2009. It was in Durham that she met and married her husband, Frederick Stewart, a young Scot who lectured in Geology. They married in September 1945 after having met at a VE Day dance; their engagement was announced in "The Times" only one month after they met. At 30, she suffered an ectopic pregnancy, undiagnosed for several weeks, and subsequently could not have children.