A known Islamic terror suspect was placed in charge of Hillary Clinton's local security detail during a trip by the US Secretary of State to Libya, Daily Mail Online can reveal.

The shocking security blunder occurred in October 2011 when Clinton made an unannounced visit to Libya following the toppling of Colonel Muammar Gaddafi.

Ironically the Secretary of State's trip was shrouded in secrecy due to security concerns.

The trip was intended as a triumphant tour to show Mrs Clinton's support for the Libyan people and build diplomatic ties at a torrid time. During her visit fierce fighting erupted in Sirte – the last stronghold of the country's former leader.

SCROLL DOWN FOR VIDEO

Her for the cheers: Hillary Clinton traveled to Libya in a secret visit on 18 October 2011 to celebrate the fall of Gadaffi - but it is now revealed that her local security detail was overseen by a known terror suspect

Acclaim: The Secretary of State went to Libya when it was thought that the fall of Gadaffi was a triumph for the Middle East. The country is now partly in the hands of ISIS

Heroes' welcome: Clinton was greeted with smiles and flowers. The Libyan government head of her security detail had been considered so dangerous by the British authorities that his movements were legally restricted

Detainee M: The Libyan who is known only by an initial because of British court laws and went on to guard Hillary Clinton (picture posed by model)

Unwittingly flanked by a man known to British security forces as a member of the banned Libyan Islamic Fighting Group (LIFG) and considered a threat to British and US national security Mrs Clinton held talks with top officials from the National Transitional Council (NTC) and spoke of her 'pride' at standing 'on the soil of a free Tripoli.'

The revelation of the extraordinary vetting oversight at the heart of the Clinton camp comes in a new book, 'Jihadi John: The Making of a Terrorist,' by Robert Verkaik published today.

It is bound to be seized upon by Mrs Clinton's critics as evidence of the State Department's inadequate concern with security in Libya – a paucity that culminated in the horror of Benghazi, a travesty that clings to Mrs Clinton to this day.

The attack on a US outpost in Benghazi, Libya came on 12 September 2012, less than a year after Mrs Clinton's proud visit to Tripoli.

Four Americans were killed in the attack, including US Ambassador Christopher Stevens, and questions have continued to be raised over the role played by the then Secretary of State – or rather over her potential failure to ensure the security of American nationals on Libyan soil.

The investigation into just what Mrs Clinton did and did not know regarding the violent events that day is ongoing and recently exploded into the infamous Servergate scandal when it transpired that Mrs Clinton maintained a private email server while working in President Obama's administration.

The release of Michael Bay's, '13 Hours: the Secret Soldiers of Benghazi' has only added to the controversy that continues to swirl around the hideous events and Mrs Clinton's role in them.

Now, with the release of his book, Verkaik has brought to light the new and disturbing security fail in Libya on Mrs Clinton's watch.

Author Verkaik is the only journalist to have interviewed Mohammed Emwazi, the man who went onto become the notorious ISIS butcher, Jihadi John.

Back in 2010, when the two men met, Emwazi was a 26-year-old IT student who claimed he was being harassed by security services who had already approached him, his family and his fiancée.

Verkaik goes onto trace Emwazi's disturbing evolution into the nightmarish figure of Jihadi John who came to define ISIS's particular brand of terror with a string of brutal beheading videos.

Murdered: The aftermath of the attacks on the American consulate in Benghazi on September 11 2012 - less than a year after Clinton's triumphal tour. Her ambassador, Christopher Stevens, and three others were murdered

Burned out: The US Consulate building in Benghazi was looted by a mob and set on fire during the attacks

Questions: The investigation into what went wrong at Benghazi when Clinton was Secretary of State has led to the discovery of her secret email server and the Servergate scandal which is dogging her White House run

He also explains how a British terror suspect managed to travel to Libya with the help of MI5 - Britain's domestic spies - when Britain decided to support the overthrow of Gaddafi.

For years the man had been on a 'control order', a restriction on his movements obtained by the British government under anti-terrorism laws because they believed he was a terrorist but did not have enough evidence which they could present in open court to obtain a criminal conviction.

He was known only as 'Detainee M' because British courts allow such suspected terrorists to be anonymous, with their real names never entering the public record. The British government never named him fully.

Other subjects of 'control orders' included a man who was suspected of being involved in a plot to blow up flights to America using liquid bombs, a terrorist scheme which resulted in the restrictions on bringing liquids on planes, and a man who was suspected of plotting a Mumbai-massacre style atrocity in the UK.

Verkaik states: 'I have been told of three British residents born in Libya who were on control orders in the UK because they were suspected of terrorism but who found support from some very unlikely sources.'

He continues: 'According to my sources, MI5 helped them travel to Libya to join the rebel forces and when two of them got into trouble with rebel militias outside Tripoli, agents from MI6 [Britain's equivalent of the CIA] were on hand to extricate them from their predicament.

'One terror suspect under a control order for many years, who is known as 'Detainee M,' even went on to head up the government security unit in charge of guarding Hillary Clinton when as US Secretary of State she made an unannounced visit to Libya in 2011.

'One woman's terror suspect is another's trusted bodyguard.'

It is believed Detainee M had come to Britain fleeing Gaddafi but as a member of the Libyan Islamic Fighting Group was placed on a control order.

Court documents seen by Daily Mail Online reveal that Detainee M was born in Libya in 1966 and raised in Sibrata.

He obtained a degree at Benghazi University in geology and geological engineering with a view to working in the oil industry.

But in 1991 he traveled to Saudi Arabia where he attended Medina University to concentrate on Islamic studies.

Famous image: The picture of Hillary Clinton using her Blackberry which became famous worldwide - and subsequently highlighted her servergate crisis - was taken as she flew to Tripoli on a C-17 transport plane

New questions: Michael Bay's, '13 Hours: the Secret Soldiers of Benghazi' has added to the spotlight on what went wrong at the US compound in 2012 when Hillary Clinton was Secretary of State

He told British immigration officers who interviewed him when he sought asylum in Britain in 1994 that his opposition to Gaddafi's regime had seen him detained and that, in 1992, he traveled to Pakistan and fought with the Arab mujaheddin against the Communist regime in Afghanistan.

Doubt was later cast on these claims and he attracted the interest of British anti-terror police who noted that he 'claimed that he was part of an anti Gaddafi organisation involved in illegal arms dealing, demonstrations and general stirring of anti Gaddafi feeling in mosques.'

His claim to asylum was rejected on multiple occasions and in 2002 he was labelled an 'Islamic extremist' and placed on a control order.

He was one of a number of Libyans on similar orders as the LIFG had carried out a number of terror attacks in the past.

The restraints of the order meant that he should have been under tight surveillance in the UK, had to surrender his passport, stay at the same address and report to a police station.

But everything changed when Britain decided to support the overthrow of Gaddafi and these Libyans were allowed to leave Britain.

Many of these fighters, Verkaik reveals, are now serious jihadists who have helped turn Libya into the terror state it is today and some have even sought a common cause with the Islamic State.

Parts of the country are now in the hands of ISIS and it has become the scene of some of its notorious propaganda victims featuring

Daily Mail Online has asked the State Department for comment.