John Kerry in Afghanistan on heels of President Karzai's U.S.-bashing KABUL U.S. Secretary of State John Kerry has flown into Afghanistan on an unannounced visit to see President Hamid Karzai amid concerns the Afghan president may be jeopardizing progress in the war against extremism with anti-American rhetoric. Kerry arrived in the Afghan capital on Monday for a 24-hour visit and was to meet Karzai, civic leaders and others to discuss continued U.S. assistance to the country. His visit coincides with the handover of a major detention center to Afghan officials. It also comes as Karzai has infuriated U.S. officials by accusing Washington of colluding with Taliban insurgents to keep Afghanistan weak even as the Obama administration presses ahead with plans to hand off security responsibility to Afghan forces and end NATO's combat mission by the end of next year. CBS News correspondent Margaret Brennan reports that Kerry met Sunday night with a top Pakistani general, with whom he discussed how Pakistan can help ease the U.S. transition to Afghan security forces. Hagel denies Karzai claims that U.S. working with Taliban Karzai irked Washington in early March with a suggestion that U.S. troops had acted in concert with Taliban militants to keep his own leadership weak -- a charge flatly denied by Secretary of Defense Chuck Hagel, who happened to be visiting Afghanistan when it was made. The U.S. military gave control of its last detention facility in Afghanistan to Kabul, meanwhile, a year after the two sides initially agreed on the transfer. The Monday handover of Parwan Detention Facility ends a bitter chapter in American relations with Afghanistan's mercurial president Karzai, who demanded control of the prison as a matter of national sovereignty. The dispute threw a pall over the ongoing negotiations for a bilateral security agreement that would govern the presence of U.S. forces in Afghanistan after 2014. Top U.S. commander in Afghanistan Gen. Joseph Dunford handed over Parwan, located near the U.S.-run Bagram military base north of Kabul, at a ceremony there after signing an agreement with Afghan Defense Minister Bismullah Khan Mohammadi. The transfer of the detention facility is an important part of the overall transition of security lead to Afghan National Security Forces. This ceremony highlights an increasingly confident, capable, and sovereign Afghanistan," Dunford said. An initial agreement to hand over Parwan was signed a year ago, but efforts to follow through on it constantly stumbled over American concerns that the Afghan government would release prisoners that it considered dangerous. A key hurdle was a ruling by an Afghan judicial panel holding that administrative detention, the practice of holding someone without formal charges, violated the country's laws. The U.S. argued that international law allowed administrative detentions and also argued that it could not risk the passage of some high-value detainees to the notoriously corrupt Afghan court system.