WASHINGTON — The Army general in charge of the Pentagon’s failed $500 million program to train and equip Syrian rebels is leaving his job in the next few weeks, but is likely to be promoted and assigned a senior counterterrorism position here, American officials said on Monday.

The officer, Maj. Gen. Michael K. Nagata, is stepping down as commander of American Special Operations forces in the Middle East, which made him responsible for the training program that ultimately produced only a few dozen fighters. That was a far cry from the 15,000 fighters that the program was going to train over a three-year period when it was formally started in December.

The Obama administration this month abandoned its efforts to build up a new rebel force inside Syria to combat the Islamic State, announcing that it will instead use the money to provide ammunition and some weapons for groups already engaged in the battle. The shift in the program made for a logical time for General Nagata to move on, said the American officials, who spoke on the condition of anonymity because the action had not yet been formally announced.