U.S. House Speaker John Boehner wrapped up a two-day trip to Afghanistan Wednesday with a demand that President Barack Obama explain how the "pace and scope" of a planned U.S. troop withdrawal will not undermine the country's fragile security gains.

The president has repeatedly said he is confident the United States can meet a self-imposed deadline to begin bringing U.S. troops back from Afghanistan in July without compromising Afghan security, though military commanders and government officials have raised concern about the readiness of Afghan security forces.

"Any drawdown of U.S. troops must be based on the conditions on the ground, not the political calculations," Boehner said in a prepared statement released by his office. "If the Obama administration insists on beginning to draw down troops in July, it must explain how the pace and scope of such a move will not undermine the tenuous progress we've made thus far. To date it has not done so."

Obama set the withdrawal timetable in 2009 when he announced the deployment of an additional 30,000 troops to Afghanistan. All U.S. troops are set to be out of the country by 2014.

The president reportedly met with Gen. David Petraeus, the top U.S. commander in Afghanistan, last month to discuss the pace of the withdrawal. Petraeus later testified before Congress about the plans, saying he was likely to recommend that some combat troops be among the first to return to the United States.

Boehner led a six-member congressional delegation to Afghanistan, where he met with Afghan President Hamid Karzai, Petraeus, commander of the NATO-led International Security Assistance Force, and other officials. The trip to Afghanistan followed a stop by the delegation in Iraq, where Boehner met with Iraqi Prime Minister Nuri al-Maliki.

Boehner said during his meeting with Petraeus that the general told him security gains in Afghanistan are "fragile and reversible."

The House speaker said that for this reason the United States must remain focused on its counterinsurgency strategy "rather than focusing on meeting arbitrary deadlines for withdrawal."