MI5, Britain's Security Service responsible for protecting the United Kingdom against threats to national security, spied on Nobel-Prize novelist Doris Lessing for 20 years, between 1943 and 1964.

It was Lessing's anti-racism stance and her membership in the Communist Party that worried MI5. Her movements were documented during her younger years by MI5 both in her homeland in Africa and in England, declassified records now show, according to BBC News.

Lessing was born in Kermanshan in western Iran, where her British father was a clerk with the Imperial Bank of Persia. In 1925 the family moved to Southern Rhodesia, now Zimbabwe.

Lessing first came to MI5's notice in the early 1940s in Southern Rhodesia when, as Doris Tayler, she married Gottfried Lessing, a communist activist and leading figure in the Left Book Club, whom she met and married in 1945. They divorced in 1949.

"Her flat is visited by persons of various nationalities ... It is possible that the flat is being used for immoral purposes," states her declassified file, which was released at the National Archives on Friday, The Guardian reported.

One Southern Rhodesian Special Branch memo dated April 1956 describes how Lessing and Paul Hogarth, the artist and illustrator who was also a Communist Party member, were tailed during a visit to the country. Southern Rhodesia Special Branch director BM de Quehen wrote that Lessing's party was "taking a great deal of evasive action and abnormal security precautions" in their borrowed Ford Consul to shake off surveillance. "It is not really known what mischief they are up to," he added, according to The Telegraph.

Doris Lessing was a British novelist, poet, playwright, biographer and short story writer. Her books include "The Golden Notebook," "The Sweetest Dream" and "The Grass is Singing," as well a number of short story collections.

Lessing, who died in 2013 at the age of 94, won the Nobel Prize for Literature in 2007.