To claim asylum, though, they first have to reach the other country. Many go through people smugglers, across Asia and through Turkey, or by boat to places like Australia. But for the diplomatic corps, the problem of getting abroad has already been solved.

Mr. Samad said that when he was ambassador to Canada, only two of the seven diplomats posted in Ottawa returned between 2004 and 2009, and that in Toronto, even fewer did. While he was in Paris, from 2009 to 2011, two-thirds returned, he said.

Before 2006, however, diplomatic attrition rates were no more than 5 percent, he said.

The practice often begins at the top, with ambassadors who leave their posts and do not return. Among them, Said Tayeb Jawad, a former ambassador to Washington, joined a diplomacy project at Harvard after his tenure ended in 2010 and then went to Johns Hopkins.

Many ambassadors have dual citizenship, making it easy for them to stay away — Mr. Samad is also American, for example. Lower-level diplomatic staff members often have to resort to going underground or applying for asylum, as many emigrants from Afghanistan already do.

In Washington, the State Department has started turning down visa requests from Afghan diplomats to bring along their extended families, like brothers, sisters and parents.

Many of the Afghans still in the diplomatic service are lobbying to get extensions that would see them through until the end of 2014.

“It’s the 2014 transition,” said Mahmoud Saikal, a former ambassador to Australia, speaking from Canberra, the capital, where he is lecturing at a university (on a temporary contract, he said). “Things are not clear; nobody is sure there will be a free and fair election. Securitywise the last few months we have seen a rapid disintegration of security at all levels, so the picture to some of our diplomats is not very good.”