Michael Shea was press officer to the Queen for almost a decade until, fatally for his career, he himself became part of the story and was embroiled in reported differences between the monarch and Margaret Thatcher.
His resulting departure from Buckingham Palace was in one sense a pity for him, in that he had dealt professionally with a number of major public issues between 1978 and 1987. These included the marriage of Charles and Diana. But in another sense his removal could be viewed as his good fortune, since no press officer could have effectively coped with the deluge of negative royal publicity as one annus horribilis was followed by another.
While in the post he dealt efficiently with dramas such as the exposure of Anthony Blunt, one-time Surveyor of the King's Pictures, as a Soviet spy. He was also on hand for the 1982 security crisis sparked when an unemployed man, Michael Fagan, shinnied up a Palace drainpipe and, entering the Queen's bedroom, chatted with her for ten minutes before staff arrived.
Although such events caused a stir in their day, they were dwarfed by the avalanche of bad publicity for the House of Windsor in the years that followed. Any press officer would have drowned in that deluge. But, by that stage, due to the Thatcher episode, Shea was no longer in the thick of things. Instead he was leading a calmer (though busy) life back in his native Scotland, highly active in public affairs as well as writing thrillers and other books.
Michael Sinclair MacAuslan Shea was born in Lanarkshire, the son of a marine engineer and a teacher. He was educated first at his mother's school and then at Gordonstoun; later in life he would become a governor of the school. He was politically active at Edinburgh University, taking over from his lifelong friend David Steel as head of its Liberal society. A teenage interest in the SNP did not endure. On leaving university he joined the Foreign Office, which, noticing that his PhD thesis was on economic development in West Africa, sent him to Ghana. His diplomatic career later took him to West Germany, Romania and New York.
In Bonn he wrote, under the name of Michael Sinclair, his first thriller. It sold well and was translated into a number of languages. He also met a Norwegian diplomat, Mona Stensen, and married her after what he described as "one of those love-at-first-sight affairs, a whirlwind engagement".
During his New York posting he impressed royal courtiers as he helped organise the Queen's visit in 1976. But his later secondment to the Palace came as something of a surprise to those who had not noticed in him any great devotion to the monarchy.
As press officer he succeeded Commander Richard Colville, whose reputation for lack of communication had earned him the nickname of the "Abominable No-Man". Shea got on well with the Queen, remembering her gesturing him to her couch and saying, "Come and sit here, I am glad you are going to join us". He accompanied her on visits to 65 countries.
He fielded the stream of crises and storms which came the Palace's way fairly well: it helped that he was, in the words of one ex-royal correspondent, charming, quicksilver and debonair. It also helped that he defined a relationship with journalists which went beyond simply keeping them at bay. But he afterwards regretted giving so much increased media access, reflecting: "There was a period where there were too many revealing in-depth interviews going on.
"I take certain blame for some of the earlier affairs because I was constantly trying to open the door, roll back the carpet a bit. Too much was given away about private lives."
As Diana became "the princess of sales" for both national and international media, with the press and public developing an insatiable appetite for news about her, he and the Queen tried in vain to impose some limits on coverage. In 1981, newspaper and television editors were invited to the Palace by Shea, who asked them to ease off on the relentless pursuit of Diana by reporters and photographers. They were then ushered in for drinks with the Queen and the Duke of Edinburgh.
The late William Deedes recounted: "I was in a small group with the Queen when she observed quietly of a recent incident with photographers: 'It's hard on a girl if she can't go to the local sweet shop without being cornered by photographers'.
"The then editor of the News of the World said rather plaintively: 'Why couldn't she send a footman for the sweets?' 'I think,' said the Queen, 'that is the most pompous remark I have ever heard in my life'."
Shea's initiative, however, came to nothing: there was no meeting of minds between the monarch and the media, and the pursuit of royal scoops went on unabated.
Shea himself was regarded as the soul of discretion, though there were a few exceptions to this. One came years later when, in a rare example of providing a private insight, he wrote: "I only once saw the Queen very angry with one of her offspring. That was when the young person concerned was rude and unthinking to a junior member of staff who was waiting at table. He didn't do it again."
Another alleged indiscretion cost Shea his job. A major controversy erupted when the Sunday Times, under the headline "Queen dismay at uncaring Thatcher", claimed that the Queen disapproved of Thatcher's approach to the miners' strike, the Commonwealth and other issues. It was said that the Queen considered Thatcherism "uncaring, confrontational and socially divisive". A string of denials came from the Palace but the Sunday Times editor, Andrew Neil, was not for turning. A hunt for a Palace "mole" ensued.
It then emerged that if there was a mole, it was Shea. He had had several conversations with one of the paper's reporters and, indeed, the story had been read out to him before publication. The Palace's fall-back position was that the paper had misinterpreted and misrepresented comments by Shea, and had omitted "crucial parts" of the story when reading it over to him.
The Palace publicly stood by Shea, but his days were numbered. After a decent interval he moved on, taking with him an honour but not the knighthood which might have been expected to come his way. He himself always maintained that he had not been guilty of any indiscretion.
For the last two decades he proved to himself that there was life after royal employ, assuming numerous roles in Scottish public life and becoming prominent in the higher reaches of Edinburgh society. He lived in splendour in apartments close to the city's castle.
In all, he was author of more than 20 books, which included thrillers as well as works on diplomacy, leadership and business. In one of his books, on handling the media, he described himself as "a quasi spin doctor".
He delivered a scathing judgement on the press: "Editors and journalists select their victim kings, garland them, fete them and put them upon their pedestals. Then, after a brief day of glory, they ritually slaughter them."
Michael Shea, diplomat and press secretary to the Queen: born Carluke, Lanarkshire 10 May 1938; married 1968 Mona Stensen (two daughters); died 17 October 2009.