NIAMEY, Niger — Created five years ago to focus on training the armed forces of dozens of African nations and strengthening social, political and economic programs, the Pentagon’s Africa Command now finds itself on a more urgent mission: confronting a new generation of Islamist militants who are testing the United States’ resolve to fight terrorism without being drawn into a major conflict.

Some military and Congressional critics question whether the command is up to dealing with its dual mission, and some influential lawmakers warn that Africom, with its headquarters in Germany, is understaffed and poorly financed for challenges that include countering Al Qaeda’s fighters in Mali, Islamic extremists in Libya, drug traffickers in West Africa and armed rebels in the Democratic Republic of Congo.

The leader of the command, Gen. Carter F. Ham, must straddle the new and the old missions, as he demonstrated one day last month when he flew to the northern reaches of this largely desert nation to watch United States troops train Niger’s fledgling border corps in basic skills to help combat Al Qaeda’s branch in North and West Africa. Then, within hours, he was back here in the capital for an urgent secure phone call from Washington to weigh what kind of advanced military support or surveillance the Pentagon could provide a French-led operation to blunt an Islamist offensive in neighboring Mali.

“The command is searching to find the right balance between the press of current military operations and the vision of longer-term engagement, helping Africans develop greater capacity for themselves,” said Christopher W. Dell, a former United States ambassador to Angola and Zimbabwe, who is General Ham’s deputy for civil-military activities.