LONDON - British Prime Minister Boris Johnson said on Friday that he would do his utmost to help Afghans who are eligible for resettlement in Britain but have been unable to reach Kabul airport for evacuation.

Earlier on Friday defence minister Ben Wallace said Britain's evacuation operation was rapidly coming to an end, and that only people who were already inside Kabul airport would be allowed on to flights out of Afghanistan.

U.S. and other Western troops are due to leave Afghanistan by Tuesday at the latest, after nearly 20 years of conflict.

On Thursday an attack by Islamic State killed two British citizens and the child of another, as well as 13 U.S. service members and at least 79 Afghans.

Britain has so far evacuated more than more than 14,500 Afghan and British nationals, the defence ministry said late on Friday.

Wallace said 800 to 1,100 Afghans who worked with Britain and were eligible to leave the country would not make it through.

Johnson said he would do all he could to help those stuck in Afghanistan who wanted to leave.

"As we come down to the final hours of the operation, there will also be people who haven't got through, people who might qualify (for resettlement). What I say to them is that we will shift heaven and earth to help them, we will do whatever we can," Johnson told reporters.

Johnson said that he believed Taliban authorities understood the need to allow safe passage for Afghans who are eligible for resettlement in Western countries.

"If they want to have engagement with the West, if they want to have a relationship with us, then safe passage for those (people) is absolutely paramount," he said.

Britain's defence ministry also said it was supporting the evacuation of scores of dogs and cats cared for by an animal rescue charity run by a former British soldier, whose plight had generated sympathy and controversy in Britain.

"Pen Farthing and his pets were assisted through Kabul airport by the UK Armed Forces," Britain's defence ministry said. "On the direction of the Defence Secretary, clearance for their charter flight has been sponsored by the UK government."

Wallace previously said he would not let a privately funded flight for pets take priority over evacuations of humans.

(Additional reporting by Kanishka Singh; Editing by Jonathan Oatis and Sandra Maler) ((; +44 20 7542 5109; Reuters Messaging: