Migrants hoping to beat security at the French end of the Channel Tunnel have discovered how to get through a locked gate into the Eurotunnel complex.

The migrants are believed to have cracked a keypad code by working out which of the buttons were the most worn and therefore the most used.

Numbers zero, two and four were, according to the Daily Telegraph which witnessed a group of 30 migrants get through the gate, much more worn than the others.

Bruno Noel, of the Alliance police union in the Calais area, told the paper: “This fence has been there for a long time and as you know when you tap in a code you don’t touch all the keys to hide your tracks, so it’s quite possible that the keys corresponding to the code are dirtier than the others. I can’t see how else it might have happened.”

The gate is about three miles from the mouth of the tunnel at the Coquelles complex and security has been strengthened in recent hours – a padlock has been added.

Most of the migrants who slipped through after the gate was opened were caught shortly afterwards by security staff but it is not known how many others might have used the route into the supposedly secure area.

The lapse of security at the entrance was revealed as the Prime Minister and the Home Office announced that the first phase of the upgrade to fencing at the site has been completed.

A Home Office spokesman said: “The UK government has recently invested £7 million for fencing at Coquelles to secure the Eurotunnel platforms, as well as further perimeter fencing. The first phase of fencing at Coquelles was completed today.

“Extra Border Force search and dog teams have also been drafted in to further protect the Eurotunnel site.”

David Cameron, during a visit to Betws-y-Coed in Conwy, said: "We have done a lot in recent days to improve the situation but there's a lot more to do.