KABUL, Afghanistan — Afghanistan will take back all its citizens to be deported from Germany as the European country struggles to accommodate hundreds of thousands of refugees and other migrants who have arrived there this year, a Kabul official said.

Afghans currently make up the second largest nationality, after Syrians, arriving in Europe. So far this year, an estimated 120,000 Afghans have left the country, legally and illegally, according to authorities. The International Organization of Migration says more than 76,000 Afghans have migrated to Europe so far in 2015.

Germany, a longtime contributor to international forces in Afghanistan and with currently 944 soldiers in NATO’s support and training mission there, has increasingly been feeling the pressure of the rising numbers of people coming in.

Last week, Germany’s interior minister complained of an “unacceptable” influx of Afghans from relatively safe areas of their country, and warned that many of them would have to return home. The minister, Thomas de Maiziere, said Afghans arriving in Germany included “increasing numbers of members of the middle class — including many from Kabul.”

It isn’t clear how many Afghans Germany might try to send back. However, German officials have been keen to stress that only people genuinely fleeing war and persecution are entitled to asylum, and that economic migrants must leave the country. Fewer than half of the Afghans who apply for asylum in Germany are granted it.

As a signatory to the Geneva Convention, Afghanistan is obliged to accept its citizens whose asylum applications have been rejected, deputy presidential spokesman Zafar Hashemi said, adding that President Ashraf Ghani and German Chancellor Angela Merkel discussed the issue recently.

Afghan Minister for Refugees and Repatriation Hossain Alemi Balkhi has disapproved of Germany’s decision to return the Afghans, saying in a recent interview with The Associated Press that Kabul is “against the forced exile of any people from any country back to where they came from.”

“The problem that caused them to leave Afghanistan in the first place has not been solved — there is still war, conflict, insecurity,” he said.

However, the minister’s international adviser, Rohullah Hashimi, said Monday that Ghani’s decision will be implemented and that a reintegration plan for voluntary refugees would be extended to deportees.

Human Rights Watch, the New York-based watchdog organization, said forced deportations were “not the answer” to Afghanistan’s migration situation.

“The answer lies in creating conditions that encourage people to stay,” said Patti Grossman, HRW’s Afghanistan researcher. “That means addressing the failure to create a stable state based on the rule of law and good governance.”

“Forcing people who may have legitimate protection needs to return, when conditions in much of the country are slipping back into conflict and when the government has not yet been able to adequately address the needs of those returning from Pakistan and Iran, is not the answer,” she added.

The Taliban have fought a particularly vicious warm-weather offensive this year, testing the capabilities of Afghan forces following the international combat troops’ departure at the end of last year. In late September, they seized the northern city of Kunduz, the first provincial capital the insurgents have taken since 2001. Government forces fought for more than two weeks to reclaim the city, a reflection of their weaknesses in offensive capabilities.

President Barack Obama announced in the wake of the Kunduz fight that he would leave U.S. troops in Afghanistan at current levels of 9,800 through 2016, rather than halving the figure at the end of this year.

(By Associated Press Writer Geir Moulson contributed to this report from Berlin)