IN the middle of June 1941 a troop ship docked at Glasgow’s Yorkhill Quay. The RMS Scythia, once a legendary liner for Cunard, was fresh from Gibraltar. It was carrying one of Scotland’s most remarkable but least known journalists, Harry Otter Whyte. And Britain’s secret police wanted to speak to him.

Whyte, along with an English colleague, Michael Davidson, had just been turfed out of Tangiers by Spanish authorities. Spooks wanted to know why.

I am not sure they ever found out. Notes of the interrogation of the then Daily Express journalists survive. Davidson was described as short and sallow, wearing Arab costume and smoking “incessantly”.

He had, reports suggested, been arrested after trying to go undercover in to French North Africa posing as a local. Whyte, who was just 34 but said to be greying, had been Davidson’s contact in Tangier. He ended up in jail. What were they up to?

The Scot, an anonymous official wrote, “did not seem at ease during the interview” and “was hesitant in his answers”.

I think the Express man had reason to be cagey. Secret police had been keeping tabs on Whyte for nearly a decade. Why? Because he was a Communist, of sorts.

His Home Office file, now declassified, is laced with innuendo but contains no credible suggestion of any actual wrongdoing. Whyte, according to previously confidential reports and correspondence, was “unsuitable” and “unreliable”.

He may, it was hinted in one note without any supporting evidence, have been involved in “dope trade” and “white slavery” in Morocco.

There were “moral” reasons for his run-in with Spanish authorities, another titbit from his dossier reveals. A Foreign Office civil servant wrote of Whyte’s “excessive drinking and his other personal habits” and said his presence in Tangier would “injure British prestige”.

Why the smears? Well, Whyte was gay. This is never mentioned in his 158-page file. Nor is the single event that defined his life and makes him, in my view, one of the most fascinating and important figures in all of Scottish left history.

Nearly 90 years ago, Harry “O” Whyte - as he was known - wrote a letter, an essay really, setting out the case for sexual equality in the USSR. He sent this document, some 4000 words of personal angst and political insight, to Joseph Stalin himself.

I do not think it is possible to overstate how courageous this was. Because Whyte at the time was living and working in Moscow. His own partner, a never-named Russian, had just been arrested in a round-up of homosexuals.

His letter is properly historic. Stalin read it. “An idiot and a degenerate,” the dictator wrote on his copy and sent it to an archive. But Whyte’s intervention - although only published after the fall of Communism - forced the regime to respond. Maxim Gorky, a writer who acted as Stalin’s attack dog, laid in to gay culture in the pages of both Pravda and Izvestia.

Whyte’s life was ruined. His security service dossier revealed he was expelled from the party - again for unspecified “moral” reasons. He was logged by spooks returning from Leningrad in 1936. He was never able to return to Russia.

His letter can feel antiquated. Some have said Whyte had internalised prejudices about his sexuality (he talked about seeking a cure). But his work is also remarkably “now”. This was a man of the left who got intersectionality. He talked about equality not just of class but of gender, sexuality and race. He was smart as well as brave.

Whyte was to die, worth just £1, in an Istanbul hotel in 1960. He was a working-class kid who got a scholarship to George Heriot’s School and then a job, aged 16, at the Edinburgh Evening News. He moved to the USSR in 1932, as a journalist for the Daily Worker and one of Stalin’s propaganda sheets.

He must have found a kind of liberty in the Soviet Union. The Russian Revolution - as well as death and destruction - had brought a whole series of sexual and gender freedoms. Homosexuality was legalised half a century before the UK. Abortion too.

That all ended while Whyte was in Moscow. Stalin’s secret police, the NKVD, persecuted gays they accused of plots against the regime. With terrifying echoes of current culture war anxieties about grooming, there was talk of a “conspiracy of pederasts”.

Whyte’s letter was sent just after the Communist regime re-criminalised same-sex relations between men. And that is another reason his work feels so contemporary: it reminds us not to take “progress” on social values for granted.

His letter re-emerged in 1993 just as Russia’s first post-Communist president, Boris Yeltsin ended the legal persecution of gays. It attracted attention. So much so that stamps on Whyte’s UK secret service dossier show renewed interest in this once obscure figure. Maybe MI5 never knew about his courage. We should.

Why raise Whyte’s legacy just now? Well, last month there were renewed calls for some kind of commemoration of another revolutionary Scot many associate with Russia.

Later this year it will be 100 years since the death of John MacLean - Vladimir Lenin’s kinda-sorta consul in Glasgow. I am not going to knock efforts to remember MacLean. As it happens, his name, albeit misspelled, was stripped from a St Petersburg avenue around the time Whyte’s letter was published.

But maybe it is also worth celebrating a man who made a remarkable stand against Stalinist homophobia?

MacLean - absurdly and falsely - insisted Russian revolutionaries were less bloody than the Tsars they replaced. Whyte very much knew otherwise but remained committed to the cause of social justice and equality.

RMS Scythia brought the Scottish journalist home barely a week before Adolf Hitler betrayed his ally Stalin and invaded the USSR. Whyte tried to go to Russia, now Britain’s friend, as a war correspondent. But he was refused a visa. Instead he signed up to fight fascism. His war work? It was for navy intelligence and marked “highly secret”.