By DEB RIECHMANN, Associated Press

WASHINGTON (AP) — Alongside the exodus of U.S. troops from Afghanistan, soldiers who hail from countries like Singapore and Slovenia, Mongolia and Malaysia have been packing up too, leaving behind an ever-shrinking NATO coalition.

The coalition has been fighting the war for more than a decade, but that combat mission ends in 17 weeks. On the agenda at this week's NATO meeting in Wales is nailing down which countries will contribute how many troops to the post-2014 mission to continue training the Afghan forces and who will pay the salaries of the Afghan policemen and soldiers going forward.

"There already has been so much blood and treasure invested no one wants to see this turn into what is happening in Iraq right now," said retired Adm. James Stavridis, who was NATO supreme allied commander from 2008 to 2013. "I think people realize we need to continue to advise and mentor the security forces for several more years."

There are about 30,700 U.S. forces still in Afghanistan, and President Barack Obama has said he wants to keep 9,800 American troops in the country after the end of the year. The number of non-American troops stands at roughly 14,400 — down more than 65 percent from a peak in May 2011 — and is shrinking fast.

Some countries like Britain with 3,936, Germany with 2,250 and Italy with 1,653 still have a sizeable number of troops in the country. But 17 countries — representing about a third of current 48-nation coalition — have just 25 or fewer troops still deployed. They are: Austria, Bahrain, Bosnia and Herzegovina, El Salvador, Estonia, Greece, Iceland, Ireland, Latvia, Luxembourg, Malaysia, Montenegro, New Zealand, Slovenia, Sweden, Tonga and Ukraine.

At its peak, about 50 nations were contributing troops to Afghanistan. Stavridis, who is now dean of the Fletcher School, a graduate school of international affairs at Tufts University in Massachusetts, predicted that the number of troop-contributing countries will drop to between 15 and 20 after the end of this year.

Starting next year, the U.S. has committed to keeping 9,800 troops in Afghanistan as part of a new NATO mission dubbed Resolute Support, which will train, advise and assist Afghan soldiers and policemen. About 4,000 to 5,000 non-American troops — mostly from Britain, Germany, Italy and Turkey — will be deployed as well, although the actual size of the new mission has not been finalized.

Formalizing those deployments will be contingent on the U.S. and NATO signing formal agreements with the Afghan government, which is in the throes of a bitterly contested presidential election. Afghan President Hamid Karzai has refused to sign them, leaving the job to his successor.

The winner of the election was supposed to have been announced by now, but the two candidates — Abdullah Abdullah and Ashraf Ghani Ahmadzai — have alleged widespread election fraud and are fighting over a recount of votes.

Besides troop numbers, a key unresolved issue is which countries will make good on financial commitments to pay the salaries of Afghanistan security forces in the future, something the Afghan government will not be able to do on its own for years.

NATO has put the price tag of a 228,500-strong Afghan security force at about $4 billion a year, while another study carried out for Congress called for a larger base Afghan force of 344,300 plus 29,100 auxiliary forces at a cost of about $6 billion a year.

Stavridis predicted that more nations — probably 40 to 50 — will be willing to bankroll the Afghan security forces, partly because it's much cheaper than deploying their own troops there.

But war fatigue is rampant across the United States and Europe, and political realities could create a financial crisis in Afghanistan in coming years, warned Omar Hamid, who specializes in terrorism threats in Afghanistan and other countries at IHS Jane's, which specializes in defense and security analysis.

"There have been commitments, but that does not account for political changes within the NATO countries," Hamid said. "The appetite to fund at current levels is doubtful with changes in governments and fresh elections in France and Germany or wherever."

If the Afghan government can't pay its troops, political instability will spread in the country, support for the security forces will decline, and some policemen and soldiers will simply leave the forces, he said.

"If you start having problems with salaries to troops, police officers not being paid or those sorts of issues, then that problem escalates and you have the possibility of people withdrawing or pulling out or units refusing to fight. That is the risk.

"As far as the political appetite to continue funding Afghanistan at current levels — that is bound to decline over the next four to five years," Hamid said.