Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — British spies tapped King Edward VIII's phone while he was having an affair with American Wallis Simpson, according to unsealed files examined in a new documentary.

Government ministers ordered the wiretapping over fears that she ran in fascist circles and he may have been leaking her secret cabinet documents. There were also concerns among intelligence officers that he had fascist leanings himself.

It was 1936 and the couple's affair caused a huge scandal in Britain because Simpson was a twice-divorced socialite.

The monarch's calls to Wallis, other royals and friends were all monitored from the telephone exchange in Green Park next to Buckingham Palace.

The bugging was revealed in a documentary, "Uncovered: Spying on the Royals," produced by Brave New Media TV and aired on Britain's Channel 4. The program also disclosed that it wasn't the first time Edward — a controversial figure known as the "playboy prince" — had been placed under surveillance.

Edward's dying father, George V, had written to prime minister Stanley Baldwin, concerned that: "After I am dead, the boy will ruin himself within 12 months." The couple was put under the watch of Special Branch police officers.

When George died, Baldwin took matters into his own hands.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

“It’s completely unprecedented for the prime minister of the day to approach MI5 and ask to intercept calls from the royal family,” said one of the researchers behind the revelations, Professor Richard Aldrich of Nottingham University. MI5 is Britain's domestic spy agency.

There were concerns the future king was being blackmailed because of the lavish gifts he was sending to Simpson and other unknown individuals.

Edward is Queen Elizabeth II's uncle who gave up the throne in 1936 in order to marry Simpson, as royal protocol forbade him marrying a divorcee. The move meant Elizabeth's father became king and ultimately led to her ascension to the throne.

The documentary draws on cabinet documents released in 2013 and the research by Cormac and Professor Richard Aldrich of the University of Warwick.

King Edward VIII and Wallis Simpson watching the Royal Proclamation ceremony from a window at London's St. James's Palace on Jan. 20, 1936. AP

Cormac said evidence suggested King Edward was seen as a potential threat to national security because it was feared he had far-right sympathies.

The anxiety was that he may be a stooge to be exploited by the Nazis and that his relationship with Simpson could lead to a constitutional crisis and a wave of strikes and riots.

Aldrich said: "The king sees a lot of top intelligence material and one of the anxieties around Edward VIII was that he was getting really secret papers from cabinet on a regular basis and he was leaving them around, he was showing them to other people, they were coming back with the stains of cocktail glasses on ... reportedly being lent to Wallis Simpson."

The prime minister feared Simpson was manipulative and had links to society figures who had fascist views, Aldrich said. He also reportedly feared Edward might dismiss his government and bring in other politicians with closer ties to Germany.

"The extent to which Edward posed a threat to national security is at the heart of this entire decision to bug him," Cormac said.

Baldwin took his request to Vernon Kell, the head of MI5, who felt Edward's behavior did not constitute a threat to national security and therefore did not warrant the intelligence services' involvement.

Vernon recommended that MI5 should not act, but his decision was overturned and eventually the agency agreed to tap the king’s phone, Cormac said.

The Duke of Windsor, Prince Edward, and his wife Wallis Simpson, on June 3, 1968 in quiet observance of their first wedding anniversary on the French Riviera. AP

Aldrich said MI5 then set up a unit to monitor the king, which was so secretive only the head of the secret service and few close colleagues were even aware of its existence.

Normal secret service protocol and channels were not followed, he added.

The phone tapping at Buckingham Palace was carried out by a rising star who was later involved in intelligence around the Allied invasion on D-Day in 1944 that thwarted the Germans.

Among the spies' discoveries was a phone call from Edward telling his brother Bertie that he’d take Wallis over crown and country.

This was days before his historic abdication address telling the nation it was "impossible to carry the heavy burden of responsibility ... without the help and support of the woman I love."