BUCKINGHAM Palace has been urged to ensure the Queen stays out of any second independence referendum campaign and remains “steadfastly neutral” after it was suggested her intervention in the 2014 poll had been carefully planned in advance.

In his new diaries, Lionel Barber, the former editor of the Financial Times, claims that just one week before the vote Prince Andrew, over lunch at Buckingham Palace, revealed Her Majesty was preparing to make a dramatic move at the height of the campaign.

The meal came just four days after Downing St went into panic following a YouGov poll for The Sunday Times that for the first time placed the Yes campaign ahead.

David Cameron, the then Prime Minister, quickly sought help from the Palace to see how the Queen could help draw things back while preserving her constitutional neutrality. The former premier suggested a raised eyebrow from the monarch, “even a quarter of an inch,” might do the trick and help save the 300-year-old Union.

On the following Sunday, September 14, the Queen quietly told a member of the public outside Crathie Kirk, which lies just outside her Balmoral estate, that she hoped Scots would “think very carefully about the future”.

Her Majesty’s remarks hit the headlines and, despite the widespread public perception, the Palace insisted any suggestion she had sought to influence the referendum result was “categorically wrong”.

The day before the referendum took place Mr Cameron together with Ed Miliband, the then Labour leader, and Nick Clegg, who headed the Liberal Democrats, signed the “vow,” promising Scotland “extensive new powers”. On September 18, the vote went 55 per cent to 45 for Scotland to stay in the UK.

The Sunday Times reported that Mr Barber said he met the Duke of York at Buckingham Palace, together with Ma Kai, China’s vice premier, on September 11, just a week before the referendum.

He referred to how the prince gave him “a nod and a wink, wink” about the Queen preparing to step into the debate that weekend.

He told The Sunday Times: “There is this scene where I am at Buckingham Palace, invited by the roguish Duke of York to lunch with the Chinese foreign minister, and Andrew suddenly half lets loose that the Queen is going to intervene on the Sunday.”

Calling the comments “pretty bloody amazing”, Mr Barber added: “That was interesting. They had clearly planned it. It was very artfully done…Andrew knew about it.”

The former newspaper editor recalled how the atmosphere at the Palace that day “was one of concern that the referendum was on a knife edge”. He felt the Queen’s intervention “may have tipped the balance” of the final result.

Tommy Sheppard, the SNP’s Shadow Commons Leader, said: “This is shocking and extremely concerning. If true, it means that political pressure was applied to the Queen to press her into areas where the monarch should not go.

“I would hope that the Palace would be able to give reassurance that the Queen will remain steadfastly neutral in the next referendum.”

After the No vote, Mr Cameron apologised for suggesting the Queen had “purred down the phone” when she was told about the referendum result.

A Palace spokesman said: “We never comment on people’s recollections of what were private conversations.”