BERLIN – German authorities said Monday they have granted 2,400 visas so far to Afghan employees of the country’s military and their relatives, although not all of them want to come to Germany immediately.

Germany withdrew its last troops from Afghanistan last week after a deployment that lasted nearly 20 years and focused on the north of the country. It had the second-biggest foreign contingent in Afghanistan after the United States’.

Defense Minister Annegret Kramp-Karrenbauer said in April that Germany has a “deep obligation” not to leave behind unprotected locals who helped its forces at risk to themselves.

Foreign Ministry spokesman Rainer Breul said that 2,400 German visas were granted in recent weeks for local employees and their relatives. He acknowledged that procedures have been complicated by the military withdrawal and the closure of Germany’s consulate-general in Mazar-e-Sharif, but said Berlin is trying to work with partners such as the International Organization for Migration. The latter’s office there hasn’t yet started work because of the security situation, he added.

Before the military left, 446 local employees and their relatives — a total of 2,250 people — were given travel documents, Defense Ministry spokesman David Helmbold said. At that point, “a relatively small number” of applications remained open, he added.

“Not all of those who received these travel documents wanted to leave straight away,” Helmbold told reporters in Berlin. “There were a number of local (employees) who said, ‘we’d actually like to stay as long as possible in Afghanistan, but we’d like to have the possibility to leave if the security situation escalates.”

He said he couldn’t give a specific figure for the number who didn’t want to leave immediately.

The U.S. military last week vacated its biggest airfield in Afghanistan, advancing a final withdrawal that the Pentagon said will be completed by the end of August. The drawdown is already largely completed, with Germany one of many allies that have pulled out in recent weeks.