Early in 1956, an officer from Scotland Yard’s Special Branch voiced his suspicions that a flat in Kensington was being used for “immoral purposes”. Chief among his grounds for concern were frequent visits by “persons of various nationalities” and the fact that its female resident was a “known Communist”.

The potential fifth columnist running an apparent house of ill repute was in fact one Doris Lessing, by then already a novelist of standing, and the “Americans, Chinese, Indians and negroes” visiting her home were attending to discuss the finer points of left-leaning literature and Marxist politics.

The allegation of brothel keeping, which Scotland Yard later begrudgingly admitted was baseless, was just one episode in a near 20-year operation by MI5 and British intelligence to keep Lessing, one of Britain’s most influential novelists who became the oldest recipient of the Nobel Prize for Literature in 2007, under surveillance as a suspected subversive.

Documents released on 21 August at the National Archives in Kew, west London, reveal how the novelist, who spent her formative years in Southern Rhodesia, was monitored and her mail intercepted for at least 18 years after she was adjudged to have formed a “deep hatred” of apartheid-style policies in the British colony and become a Communist sympathiser.

Lessing was one of hundreds of leftwing academics and intellectuals whose Cold War contacts with the Communist Party of Great Britain (CPGB) brought them to the attention of MI5, which had thoroughly bugged the party’s London headquarters, as well as phone boxes in the surrounding area to monitor the calls of “surveillance-aware” activists.

But the security services both in Britain and its remaining colonial possessions seem to have considered Lessing a particular threat, closely monitoring her travels to locations from Czechoslovakia to southern Africa, where a tip-off from London of her visit resulted in her being banned for many years from apartheid-era South Africa.

Doris Lessing continued to write until 2008, leaving behind almost 30 novels (Reuters)

One MI5 source told his controllers that the novelist should be considered as “an attractive, forceful, dangerous woman - ruthless… and not prepared to do anything against any form of Communism”.

The scrutiny of the writer began in 1944 when British colonial intelligence officers complained about a pro-Communist book club run in Rhodesia by Lessing and her second husband, Gottfried Lessing, a Jewish refugee. One memo to London said: “The general tone of the club is reported to be very left, and it is stated that most topics of discussion there usually end up in anti-British, anti-capital and anti-imperialist vapourings.”

The writer, who came to Britain in 1949, published her first book, The Grass Is Singing, in 1950 and established herself as a powerful voice on the iniquities of colonialism. She went on to become a multi award-winning author, respected for her firebrand views on inequality and blunt frankness (she called her winning of the Nobel Prize a “bloody disaster” because it stopped her writing).

But MI5 viewed her anti-racist views and her association with various literary and political groups dedicated to building links with the Soviet Union with deep suspicion. One 1951 report in her Security Service personal file said: “Doris Lessing has been described as certainly pro-Communist although it is doubtful if she is a party member. Her Rhodesian background has brought out in her a deep hatred of the colour bar which has now reached the point of fanaticism. In this way her Communist sympathies have been increased.”

Famous Nobel Prize for Literature winners Show all 11 1 /11 Famous Nobel Prize for Literature winners Famous Nobel Prize for Literature winners Seamus Heaney, 1995 The Irish poet won 'for works of lyrical beauty and ethical depth, which exalt everyday miracles and the living past' Rex Famous Nobel Prize for Literature winners Doris Lessing, 2007 The judges commended the 'epicist of the female experience', who 'with scepticism, fire and visionary power has subjected a divided civilisation to scrutiny' Reuters Famous Nobel Prize for Literature winners Toni Morrison, 1993 The judges said the writer's novels 'give life to an essential aspect of American reality' AFP/Getty Images Famous Nobel Prize for Literature winners Samuel Beckett, 1969 The Irish-born playwright won 'for his writing, which - in new forms for the novel and drama - in the destitution of modern man acquires its elevation' Rex Features Famous Nobel Prize for Literature winners William Golding, 1983 The British novelists won for his 'realistic narrative art' and his use of the 'diversity and universality of myth, [which] illuminates the human condition in the world of today' Corbis Famous Nobel Prize for Literature winners Harold Pinter, 2005 The playwright's works were deemed to 'uncover the precipice under every prattle and force entry into oppression's closed rooms' Getty Famous Nobel Prize for Literature winners JM Coetzee, 2003 The judges said the South African writer 'portrays the surprising involvement of the outsider in innumerable guises' Reuters Famous Nobel Prize for Literature winners Günter Grass, 1999 The German writer was selected for his 'frolicsome black fables [that] portray the forgotten face of history' Getty Images Famous Nobel Prize for Literature winners Gabriel Garcia Marquez, 1982 The Colombian writer was commended for his use of magical realism, which 'reflects a continent's life and conflicts' Getty Images Famous Nobel Prize for Literature winners Derek Walcott, 1992 The Saint Lucian poet won for 'a poetic oeuvre of great luminosity, sustained by a historical vision' Getty Images Famous Nobel Prize for Literature winners V S Naipaul, 2001 The Trinidad and Tobago-born writer was commended for his 'perceptive narrative and incorruptible scrutiny' Getty

A 17-day visit by Lessing to Czechoslovakia and Russia as a delegate of the Authors for World Peace movement in 1951 was watched closely by the Security Service, which arranged for customs officers to search the belongings of those on the tour once they had returned from behind the Iron Curtain.

But the documents suggest it was her continuing links with southern Africa which excited the most interest. When she departed on a tour of Rhodesia and South Africa in 1956 with illustrator Paul Hogarth, a CPGB member who worked for Graham Greene and John Betjeman, their every move was followed.

After a day of following the pair in their borrowed Ford Consul, one intelligence report stated: “They were taking a great deal of evasive action and abnormal security precautions to shake off surveillance.”

Lessing, who was expelled from South Africa during the trip after an alert to the apartheid country’s police force from London, was also followed onto a flight back to Britain and observed to be writing in a large black notebook which her tail considered suspicious because the author covered what she had written each time someone came past.

An attempt to find the notebook in her luggage upon her return to London airport was abandoned because of fears it would alert Lessing to MI5’s scrutiny.

While the author, who died in 2013 aged 94, maintained her radical politics throughout her life, her MI5 file reveals nothing to suggest she was an active threat to national security. She publicly distanced herself from the CPGB and the Soviet Union in the wake of the brutal quashing of the Hungarian uprising in 1956. Along with other Marxist intellectuals, including the historian Eric Hobsbawm, Lessing wrote an open letter criticising the CPGB for its “hopeless and gutless” failure to condemn the Soviet bloodbath in Budapest.

MI5, which continued to monitor the novelist and open her mail until at least 1962, nonetheless remained unconvinced that Lessing had forsaken all revolutionary ambitions.

One source was reported as saying in 1958 that he was unconvinced that she had “broken completely with the Communist Party”, adding she “would be prepared to string along if the Party courted her”.