Kabul: Afghan President Ashraf Ghani plans to retire more than 2,000 army generals and other senior officers, aiming to bring new blood into the military's top ranks to battle a resilient Taliban insurgency, officials said.

Many of the existing commanders are "too old to keep up with modern warfare", a senior military official said, adding that the U.S. military had been pressing for a clear-out of the ranks.

The army structure is top-heavy with senior officers, reflecting a country that has been at war for nearly 40 years. But the plan is causing resentment among the veteran officers, many of whom fought in U.S.-backed mujahideen against Soviet occupation in the 1980s, the civil war in the 1990s, or were part of the 1990s Northern Alliance opposition to Taliban rule.

"We have more generals and colonels than the U.S. army ... generals and senior officers going back generations who can't fight, can't lead and have occupied their posts for years," said a senior government official involved in the reform effort.

"The shake-up is absolutely necessary because our allies, particularly the Americans, have clearly told that us they won't be able to win with this current set-up," said the official, who declined to be identified.

Dawlat Waziri, spokesman at the Ministry of Defence, said 164 generals and other senor officers were retired last week, adding that about 2,100 more generals and colonels would be retired in phases over the next 18 months. Younger officers had been frustrated by a lack of promotion for years, Waziri said. "They were stuck in one post and could not get promotion and it was hurting their morale," he said.

Retiring officers would get $250 for every year of service, plus a pension of several hundred dollars a month, the first official said. Younger officers welcomed the plan. "I knew one day the government would realise that we need to rise up the ranks as we shoulder most of the fighting," said Lieutenant-Colonel Mohammad Rasuli, a squad leader in the army's 215 Corps based in the southern province of Helmand.

"This decision will give our young officers hope and better morale to defend their country," Rasuli, 29, said by telephone from the provincial capital of Lashkar Gah.

A spokesman for the NATO-led mission in Afghanistan said the government was fully responsible for the Afghan security forces and their reform, with U.S. and other foreign forces playing a supporting role.

"This reform will pave the way for long-term success as ranks replenish," said the spokesman, Captain Tom Gresback. The retiring officers could use their knowledge and experience to help build the country's "civilian backbone", he said.

Afghanistan's security forces reflect the fortunes of the different factions that have battled for supremacy for decades. Many top commanders were former members of the Northern Alliance, dominated by ethnic Tajiks, who, backed by U.S. forces, drove out the Taliban in 2001.

The ouster of the Taliban also cleared the way for veteran officers from the Soviet-backed army in the 1980s to return to the ranks. Ghani, a former academic and World Bank technocrat who became president in 2014, wants to bringing younger, better-educated people into all sectors of government, not just the armed forces.

But his plan has met with opposition, including from some senior officers who see the process as an attempt by Ghani's administration to remove ethnic Tajik officers from power.

Ethnic tensions are running high amid political squabbling between factions and polarisation between the two main ethnic groups, the Pashtuns and Tajiks, as the country prepares for a delayed parliamentary election due this year and a presidential election next year.

"I served in the army for 15 years and in no way is this decision acceptable to me because it's a political decision by Ghani who wants to systematically erase ethnic Tajiks from the force," General Sameem Sameen, who was one of the officers retired last week, told Reuters.

"This is an insult to me and to many other generals who have served their country with pride," he said.

But another young army officer, First Lieutenant Hujatullah Hazrat, said the time was right for a clear-out. "The old generals have no stamina to do their duties and they were there only to get their salaries," Hazrat, 29, told Reuters. "They're not familiar with modern weapons and military doctrine and they've caused us a lot of failures."