Updated

Gen. David Petraeus, the U.S. commander in Afghanistan, said Tuesday that the U.S. military has halted much of the Taliban's battlefield momentum, putting the U.S. on course to begin pulling out troops in July and transferring security responsibility to the Afghans.

In testimony to the Senate Armed Services Committee, Petraeus cautioned that security progress is still "fragile and reversible," with much difficult work ahead as the Taliban launch an expected spring offensive. It was the general's first testimony on the war since he took command in Kabul last summer.

He also spoke about Iranian influence rising in Afghanistan, saying that the U.S. recently intercepted 48 122 mm rockets -- a "significant increase" of weapons entering the country with "double the range of the 107 mm rockets" that previously have been found in Afghanistan.

The Iranians are conflicted, Petraeus said. They don't want to see return of the Taliban but they also don't want to see America succeed, he said.

Petraeus said he supports President Obama's plan to begin reducing the number of U.S. troops in July; he said he would prepare options for that and make a recommendation to Obama.

"The momentum achieved by the Taliban in Afghanistan since 2005 has been arrested in much of the country and reversed in a number of important areas," Petraeus said. "However, while the security progress achieved over the past year is significant, it is also fragile and reversible."

Petraeus is balancing his troops' solid progress in combat with worries about Kabul government corruption, an expected Taliban resurgence this spring and the slow development of Afghan security forces.

Testifying alongside the general, the Pentagon top civilian policy official, Michele Flournoy, said, "Our strategy is working." She said U.S., NATO and Afghan forces are regaining critical territory and wresting the initiative from the insurgents.

In remarks at the hearing's outset, Sen. John McCain, the committee's top Republican, said that he is encouraged by progress in the war, although concerned that the fighting will become more intense this spring and summer.

"NATO forces will surely face a renewed Taliban offensive this spring to retake the territory and momentum they have lost on the battlefield -- and those losses have been considerable," McCain said. "U.S., NATO, and Afghan Special Forces have dealt a crushing blow to the midlevel leadership of the Taliban and its Al Qaedaallies."

Petraeus said that the substantial military gains could be jeopardized unless Congress provides adequate funding to the State Department and the U.S. Agency for International Development to provide economic development, governance and other civilian assistance.

"I am concerned that levels of funding for our State Department and USAID partners will not sufficiently enable them to build on the hard-fought security achievements of our men and women in uniform," he said.

Petraeus, who met with Obama on Monday, claims the U.S., Afghan and allied forces have been able to substantially oust the Taliban from historical strongholds, particularly in the south. He is beginning to sketch out how the Afghan forces can slowly begin taking control in more stable locales as U.S. troops shift to still precarious regions.

"The situation on the ground will almost certainly be the most promising part of the story that Gen. Petraeus can tell," said Karl F. Inderfurth, a former senior State Department diplomat for South Asia. He said other difficult struggles will determine success, including the reconciliation process with more moderate Taliban, establishment of a more capable government and the effort to persuade the Afghan people.

A topic of continued debate will be the militants' safe havens along the mountainous Pakistan border, and Islamabad's reluctance to move into insurgent strongholds in North Waziristan -- where senior Al Qaedaleaders, including Usama bin Laden, are rumored to be hiding.

Members of Congress, meanwhile, will roll out a resolution calling for Obama to withdraw U.S. forces from Afghanistan either in 30 days or no later than Dec. 31, 2011. While the measure has failed in the past and is almost certain to fail again, the debate will underscore Congress' impatience with the war in the face of increasing budget pressure.

Petraeus carries a lot of weight with lawmakers who credit him with leading a turnaround in the Iraq war and beginning the withdrawal of combat forces there.

He was last in the Oval Office in June, when Obama fired Gen. Stanley McChrystal and turned to Petraeus as an emergency replacement. Petraeus left for Kabul immediately and has made a point of staying out of the political spotlight until now.

The Associated Press contributed to this report.