David Cameron sought support from the Queen during the Scottish independence referendum campaign after a poll predicting a Yes victory "panicked" him, the ex-prime minister has said.
Mr Cameron made contact with Buckingham Palace officials in 2014, suggesting the monarch could "raise an eyebrow" in the close-fought campaign.
The former PM said he took the action after he felt a "mounting sense of panic" after a poll put the Yes to independence campaign ahead for the first time while he was staying at Balmoral.
He told the BBC that the poll findings felt like a "blow to the solar plexus" and led to a "mounting sense of panic that this could go the wrong way".
Mr Cameron said: "I remember conversations I had with my private secretary and he had with the Queen's private secretary and I had with the Queen's private secretary, not asking for anything that would be in any way improper or unconstitutional, but just a raising of the eyebrow, even, you know, a quarter of an inch, we thought would make a difference."
A few days before the referendum in September 2014, the Queen told a well-wisher in Aberdeenshire that she hoped "people would think very carefully about the future".
The comment was seized on by many pro-union campaigners as an indication that the Queen was urging voters to keep the UK together.
Referring to the Queen's remarks, Mr Cameron said: "It was certainly well covered (by the media) ... Although the words were very limited, I think it helped to put a slightly different perception on things."
Scotland voted to remain in the UK by a 55% to 45% margin.
A documentary about Mr Cameron's time in power also reveals that former chancellor George Osborne believed the Brexit referendum result was partly due to Mr Cameron stoking the idea that "Brussels was to blame".
Mr Osborne told the programme: "We held a referendum we should never have held", and "the consequences for the country are grave".
He attacked Mr Cameron's approach to the issue, saying: "David Cameron was just one of a number of British prime ministers who had fed this idea that we were different than Europe, that Brussels was to blame and that the public ultimately had to have a say, and we've all paid a price for it in my view.
"I feel very sorry for what happened, and I feel responsible, I was the chancellor of the exchequer in that government, we held a referendum we should never have held, we then lost that referendum and the consequences for the country are grave, and the only thing I can plead in my mitigation is that a huge number of people wanted that referendum, and I made a case against it, but it wasn't heard."
The Speaker of the House of Commons John Bercow (L) speaks as Queen Elizabeth, Archbishop of Canterbury Justin Welby, Prime Minister David Cameron and Chris Grayling, leader of the House of Commons listen, at a reception in Buckingham Palace to mark the The Queen's 90th Birthday, London, Britain May 10, 2016. REUTERS/Paul Hackett
Tory leadership hopeful David Cameron is congratulated Thursday September 29, 2005, by his wife Samantha, after making his case for the party leadership in London. See PA story POLITICS Tories. PRESS ASSOCIATION Photo. Photo credit should read: Ian Nicholson / PA
Tory leadership hopeful David Cameron stands with his wife Samantha, after making his case for the party leadership in London.
Tory leadership contender David Cameron during a reading class in Dewsbury Sunday October 2 2005, before heading to Blackpool foe his party's annual conference. See PA Story POLITICS Tories_Cameron. PRESS ASSOCIATION Photo. Photo credit should read: John Giles/Pool/PA
Conservative leadership rivals Kenneth Clarke (left) and David Cameron (right) during seperate radio interviews in the lobby of the Imperial Hotel, Blackpool.
Conservative leadership contender David Cameron salutes the audience following his speech to the Conservative Party conference in Blackpool.
Billie Piper with the Most Popular Actress award that was presented to her by Conservative Party leadership candidates David Davis (left) and David Cameron at the National Television Awards 2005 (NTA), at the Royal Albert Hall, central London.
Conservative leadership candidate David Cameron meets Kent and Sussex party members at the De La Warr Pavilion in Bexhill, Sussex.
Tory leadership candidates David Davis (right) and David Cameron appear in a special edition of BBC One's Question Time Thursday November 3, 2005. The programme was broadcast live from Nottingham's Albert Hall at 10.35pm. Watch for PA story POLITICS Tories. PRESS ASSOCIATION photo. Photo credit should read: Rui Viera/PA
David Cameron in Winchester during his leadership campaign for the Conservative Party.
Conservative leadership contender David Cameron travels on the Northern Line tube from The Oval to Kings Cross while on his Conservative leadership campaign.
Conservative leadership contenter David Cameron with Jeremy Paxman , Whittlebury Hall.
Conservative party leader David Cameron and his wife, Samantha, stand outside their home in Notting Hill, west London, with their son, Arthur Elwen, who was born Tuesday this week.
The Shadow Cabinet stand outside at the Racquet Club in Liverpool,after a meeting. They are: (front L to R) Theresa May, David Lidington, Theresa Villiers, David Cameron, William Hague, Cheryl Gillan, Peter Ainsworth Caroline Spelman, (middle L to R) Oliver Letwin, Alan Duncan, Andrew Mitchell, David Willetts, Andrew Lansley, (back L to R) David Davis, Patrick McLoughlin, George Osborne, David Mundell, Chris Grayling, Phllip Hammond, Francis Maude, and Oliver Heald.
Conservative Party leader David Cameron shakes hands with a man wearing a Tony Blair mask as he addresses a demonstration by hospital workers and patients against hospital closures opposite the Houses of Parliament in central London, Tuesday March 28, 2006. Watch for PA story. PRESS ASSOCIATION photo. Photo credit should read: Johnny Green/PA
Conservative party leader David Cameron and his wife Samantha leave after casting their votes at a polling station at Oxford Gardens Primary School near their west London home.
Leader of the Conservative Party David Cameron (right) is given a tour of Kandahar airbase, Afghanistan by Major Guy Maverley from York, Commanding Officer of General Support squadron on a surprise trip to the country to visit the British troops
Leader of the Conservative Party David Cameron meets French Politician Nicolas Sarkozy (left) at the Lanesborough hotel in central London.
Conservative Party leader David Cameron with his wife Samantha and their daughter Nancy shopping in Portobello Market in London, on the eve of the Conservative Party Conference in Bournemouth.
Left to right: Liberal Democrat Party leader Sir Menzies Campbell, British Prime Minister Tony Blair, and Conservative Party Leader, David Cameron prepare to lay a wreath at Cenotaph in Whitehall, central London where the Queen led the nation in two minute's silence in honour of Britain's war dead.
Leader of the Conservative Party David Cameron (left) walks through the Benchill area of Wythenshawe during his visit to Manchester whilst Ryan Florence, 17, makes a gun gesture.
Conservative leader David Cameron (right) during a walk-about in Sheperds Bush, west London.
Leader of the Conservative Party David Cameron meets a New Devon cow on a visit to Occombe Farm, Paignton, Devon.
Tory Leader David Cameron in flooded Clanfield near Witney during a visit to his Oxfordshire constituency, to survey the effects of flooding.
Conservative Party leader David Cameron meets the Governor of California Arnold Schwarzenegger (left) at his office in Sacremento in California today. Mr. Cameron is on a three day visit to the west Coast of America.
Tory leader David Cameron is presented with signed gloves by boxer Amir Khan at the new Gloves Community Gym in Bolton, Lancashire.
Conservative Party leader David Cameron presents Baroness Thatcher with a Lifetime Achievement Award at the Morgan Stanley Great Britons Awards 2007 at the Guildhall, London.
Embargoed to 0001 Thursday February 11 File photo dated 29/6/2008 of former South African President Nelson Mandela with Conservative Party leader David Cameron at The Dorchester in central London. On the 20th anniversary of Mandela's release from prison, a senior Labour MP and former trade union leader today called on Cameron to apologise for his visit to apartheid-era South Africa.
US senator Barack Obama meets with Conservative Party leader David Cameron outside the Houses of Parliament in London.
A cardboard cut out of Gordon Brown standing outside BetFred Bookmakers in Manchester showing the latest odds on David Cameron becoming Prime Minister.
Runners including Jodie Kidd, Winston Squire and David Cameron begin the Sainsbury's Sport Relief Mile, on Victoria Embankment in central London.
Prime Minister David Cameron and Deputy Prime Minister Nick Clegg in the House of Commons, London, as MPs gather for the first time since the General Election.
Prime Minister David Cameron addresses British soldiers at Camp Bastion in Helmand Province during his two day visit to Afghanistan.
British Prime Minister David Cameron (second left) his wife Samantha (right), French President Nicolas Sarkozy (second right) and his wife Carla Bruni (left), meeting in 10 Downing street, London.
Prime Minister David Cameron meets with Italian Prime Minister Silvio Berlusconi at the G8 Summit in Muskoka, Canada, today.
Prime Minister David Cameron inspects Officer Cadets during their passing out ceremony at The Royal Military Academy in Sandhurst, Surrey today.
Prime Minister David Cameron holds his baby daughter, Florence Rose Endellion Cameron who was born on Tuesday August 24, during their summer holiday in Cornwall.
London Mayor Boris Johnson (right) shares a joke with Prime Minister David Cameron in east London at the launch of a government initiative to transform the east end of London into a world leading technology city to rival Silicon Valley in America.
Prime Minister David Cameron (right) drinks a toast at a contract signing with Chinese Premier Wen Jiabao (not pictured) with Education Secretary Michael Gove (left), Business Secretary Vince Cable (2nd left) and Chancellor George Osborne (2nd right) at the Great Hall of the People in Beijing on the first of a two day trip to China.
Prime Minister David Cameron and Home Secretary Theresa May visits UK Border Agency staff at Terminal 5 of Heathrow Airport, Middlesex, where they were shown differences between fake and real passports.
Prime Minister David Cameron shakes hands with Boris Becker during a charity tennis match at Chequers, Buckinghamshire.
Queen Elizabeth ll and Prince Philip, Duke of Edinburgh meet Prime Minister David Cameron and his wife Samantha Cameron at Number 10 Downing Street, for a lunch to celebrate the Duke's 90th birthday on June 21, 2011.
Actor Hugh Grant meets Prime Minister David Cameron during the Conservative Party Conference in Manchester where he raised issues regarding the recent News of the World phone hacking scandal during their conversation.
Prime Minister David Cameron applauds the gold medal won by GB rowers at Eton Dorney, when he sat with workers at the Team GB house inside the main operations centre situated in the Westfield Centre in Stratford, east London.
German chancellor Angela Merkel arrives at Downing Street in London, to meet with Prime Minister David Cameron.
British Prime Minister David Cameron meets with Russian President Vladimir Putin (left) at Charles De Gaulle Airport in Paris, as they travelled to France ahead of the 70th anniversary D-Day commemorations.
Prime Minister David Cameron arrives at 10 Downing Street, London, with his wife Samantha, following an audience with Queen Elizabeth II at Buckingham Palace, to confirm his second term as Prime Minister following his party's General Election victory.
Discover More Like This
BACK TO SLIDE
Mr Cameron and the ex-chancellor also talked about their attempts to keep Michael Gove on their side in the referendum campaign.
The ex-PM described the "bombshell" moment Mr Gove said he would support the Leave campaign.
Referring to the then PM Mr Cameron, the Chancellor of the Duchy of Lancaster, Mr Gove, said: "Some of the conversations we had were attempts on his part to reassure himself that our friendship would mean that I wouldn't stray from the fold.
"I think David, understandably, felt that since I'd been prepared to knuckle under on a number of occasions beforehand and put my own feelings to one side in order to serve the team, that on this occasion, that I would do the same."
– The first episode of the two part documentary The Cameron Years is broadcast on BBC1 at 9pm on September 19.