At the heart of Britain’s ability to stop dangerous people entering the country is Semaphore, a system which checks passenger data against watch lists of suspect individuals.

Every day Semaphore scans information on passengers traveling to and from Britain on planes, trains and ferries against lists of those flagged up by government agencies.

The system - unlike its predecessor - helps alert the border agencies to suspect passengers bound for the UK before they board planes.

Theresa May, the Home Secretary

Matches are passed to the National Border Targeting Centre (NBTC) which decides whether to stop the passenger from boarding, intercept them at passport control or let them enter the UK.

This newspaper has learnt that on Sunday, June 14, and Monday, June 15, the Sempahore system suffered two national outages after being overwhelmed by requests.

The first crash happened when a fault saw tens of thousands or error messages flood the system which froze under the pressure.

Both Mrs May and James Brokenshire, the immigration minister, were alerted shortly before midnight as technicians worked through the night, updating the government every hour.

“Theresa May and the Home Office have very serious questions to answer about what went wrong”

Labour shadow police minister Jack Dromey

The system appeared to stabilise before another malfunction saw hundreds of thousands of passenger details flood the system and trigger another outage on Monday night. Mrs May was notified again.

Officers at the NBTC warned that instead of seeing hundreds of matches they had received just one – meaning potential criminals and jihadists heading to Britain were not being flagged up.

Specialists worked through the night again trying to locate the source of the problem before finally stabilising the system on Wednesday.

They occurred just months after the Charlie Hebdo shooting that saw jihadists kill 11 people in Paris and while Britain’s threat level was set at “severe”, meaning a terrorist attack is “highly likely”.

It raises questions about whether Semaphore, which was meant to have been scrapped five years ago and will remain in place until at least March 2019, can be relied upon.

The failures were also not cited in inquiries into Britain’s eBorders system by the National Audit Office and the Commons Public Accounts Committee, who both published reports after the incident.

A Home Office spokesperson said: “Protecting our border is, and always has been, of paramount importance to the Government.

“Throughout these incidents, we maintained full checks on 100 per cent of arriving passengers using the Warnings Index – which is a completely separate to Semaphore, our pre-departure advance checking system. This ensured no passenger who was the subject of a Warnings Index entry entered Britain.

“We use a number of advanced technology systems as part of our multilayered approach to border security. As well as the Warnings Index and Semaphore, we run checks on the Schengen Information System - which provides law enforcement with real-time alerts on wanted criminals and terrorists – and collect data on exit checks.