By Matt Gibson
Airline passengers were stuck in queues for as long as four hours as a result of an IT problem which affected the computer system used by the Border Force.
The Home Office has apologised to incoming travellers who were delayed on Wednesday evening as a result of the technical issues and said engineers are working round the clock to resolve it.
James Brokenshire, minister for immigration and security, said on Thursday: "Our engineers have been working through the night to fix the temporary IT problems that regrettably led to longer queues for some passengers at passport controls.
Security a priority
"The current situation is much improved and we are doing our best to keep waiting times to a minimum during this morning's busy period.
"We apologise for any delays but security must remain our priority at all times."
Mr Brokenshire was at Heathrow on Thursday morning personally overseeing the work being carried out to fix the problem.
A spokesman for the airport said on Thursday that passengers "were clearing immigration in good time", adding "there are no problems affecting Heathrow at the moment".
On Thursday Gatwick Airport tweeted: "Yesterday's difficulties with (UK Home Office) IT systems have now been resolved."
The glitch impacted on airports' immigration desks across the country as well as at ports.
Government sorry for glitch
Additional staff were recruited at airports to help tackle the backlog.
Passengers attempting to enter the UK were affected. Those travelling with non-EU airlines bared the brunt of the problem.
The government said it was sorry for the glitch but stressed that security of the border remained its priority.
Company director Chris Hyland, 32, from north London, said it took him an hour and a half to get past passport control after arriving from Geneva.
"It's an absolute nightmare," he said. "We've been told there is an IT failure but that's it. You would have thought there would be a back-up plan."
He added: "It is very frustrating. Nobody is really saying anything. The international queue is pretty huge, so people have already started sitting down because they know they will be there for a long, long time."