Sunday Telegraph Political Editor Patrick Hennessy analyses the
relationship between the royal family and the two architects of New Labour.

Tony Blair became the first prime minister to have his relationship with the Royal family turned into a film while he was still in office.

The 2006 release, starring Michael Sheen as Mr Blair and Dame Helen Mirren as the Queen, depicted the often fraught negotiations surrounding the death of Diana, Princess of Wales, nine years earlier, just months after Mr Blair had entered Number 10.

Mr Blair first met Diana when he was leader of the opposition, and immediately found in her a kindred spirt. As he writes in his memoir, A Journey, "just as we [New Labour] were changing the image of Britain, she was radicalising the monarchy".

This tension between Diana and the rest of the Royal family mirrored, to an extent, the relationship between Mr Blair and the Queen. The traditional annual visit by the prime minister to Balmoral became something of an ordeal for Mr Blair and, in particular, his wife, Cherie, who refused to curtsy to Royal family members and, memorably, used her own memoirs to reveal that the couple's youngest son, Leo, had been conceived on the Scottish estate after she neglected to pack her "contraceptive equipment".

Relations between Gordon Brown and the Royal family were less tense, but more formal. Mr Brown's wife, Sarah, a more emollient figure, made a point of curtsying, drawing a sharp contrast with the spiky Mrs Blair.

There was little sense of any particular warmth in royal circles towards Mr Brown, however. For his part, Mr Brown, who constantly stressed the importance of British tradition and values, behaved "impeccably" in his dealings with Buckingham Palace, according to his former aides. Despite the complexities of relations, it seems extraordinary that the last two British prime ministers have not received invitations to this week's royal wedding.

The "snub" seems even more baffling because Mr Blair and Mr Brown were Labour prime ministers, while their two immediate Conservative predecessors, Sir John Major and Lady Thatcher, were invited.

The Queen, as head of state, is of course strictly neutral in terms of party politics.

Mr Blair's 10-year premiership was studded with royal-related incidents, some of which turned into rows. His close relationship with Diana (including a visit to Chequers soon after his 1997 election victory during which the young Prince William played football in the garden) was looked at askance by some close to the Queen, although it is understood that the monarch, the Duke of Edinburgh and Prince Charles came to value greatly the advice their prime minister gave them on dealing with the public mood on the Princess's death.

Undoubtedly the lowest point came with the funeral of the Queen Mother in 2002, when Downing Street was accused of trying to "muscle in" on arrangements to ensure a more prominent role for Mr Blair.

He has always denied trying to do so - but admits in his book that the episode left a "bitter taste".

Privately, those close to him strongly suspected that members of the royal household had briefed the media in an attempt to take Mr Blair down a peg or two because he was getting "too big for his boots".

Mr Blair uses A Journey to reveal details of private conversations with the Queen and the Duke - again in defiance of convention - including a difficult decision on whether he should link arms with her on the singing of Auld Lang Syne at the Millennium Dome at the turn of the century. ("I made my choice, stretching out my arms. She kept her options open, holding out one arm.")

This sort of breezy anecdote is unlikely to have gone down to well at the Palace. Neither, of course, did the decision in 2004 to ban fox hunting - a sport traditionally popular with the Royal family.

Two weeks after the ban went through parliament the Princess Royal was pictured with the Beaufort Hunt in what was seen as a gesture of solidarity.

When Mr Brown succeeded Mr Blair in June 2007 his first appointment was with the Queen at Buckingham Palace. His audience of 58 minutes lasted more than twice as long as Mr Blair's 27 minutes a decade earlier - but this can almost certainly put down to the former's regard for due deference rather than to any particular warming of relations between the palace and No 10.

During the Brown years, the Queen appeared to take an amused view of his idiosyncrasies.

On one occasion, during a state banquet at Windsor Castle, Mr Brown appeared to get lost after walking the wrong way round the banqueting table. An open microphone picked up the monarch informing the Princess Royal: "The Prime Minister got lost. He disappeared the wrong way... at the crucial moment."

In 2007, shortly after coming to office, Mr Brown and Sarah sparked a minor rumpus by declining an invitation from the Queen to attend the Highland Games in Braemar, Aberdeenshire, preferring to head straight to Balmoral. This sort of incident, however, was very much the exception to the rule.

A former aide of Mr Brown's remembers the ex-prime minister doing his best to observe every protocol in relations with the Royal Family. He adds: "Gordon sees the monarchy as a central part of British democracy. He attended every function religiously and showed respect to all members of the Royal family on every occasion. "There is no sense that his relationship with the Queen was any worse than Tony Blair's, John Major's, or Margaret Thatcher's."

Mr Brown was also scrupulous in making sure there was regular and useful contact between No 10 and palace officials - almost certainly with a view to avoiding a repeat of the fiasco of the Queen Mother's funeral - with No 10's "point man" being Jeremy Heywood, his principal private secretary. He was, perhaps, fortunate that no major "incident" involving the Royal family occurred during his time as prime minister.

The Queen has dealt with 12 prime ministers during her reign beginning with Winston Churchill, and, while it is inevitable that these sensitive relations have their ups and downs, Labour MPs will not be alone in thinking it odd that the two former occupants of Numbers 10 have not been invited to the marriage of her eldest grandson.