(CNN) -- U.S. Secretary of State John Kerry made a previously unannounced visit to Afghanistan on Monday to repair strained relations with President Hamid Karzai as the American-led international force continues to prepare to end its combat mission next year. Kerry's stop came on the same day that U.S. forces turned over control of a prison that has caused tension between the two nations, with Americans retaining a say on the handling of certain Taliban inmates. The talks on Monday followed controversial comments by Karzai in recent weeks that seemed to accuse U.S. forces of working with the Taliban to kill Afghan civilians, a charge denied by U.S. officials.
@highlight
NEW: Kerry pledges U.S. commitment to Afghanistan beyond 2014
@highlight
NEW: President Karzai thanks America for its support
@highlight
Earlier Monday, the United States turns over a prison to Afghan control
@highlight
Kerry makes an unannounced visit to Afghanistan to meet with Karzai
He said media reports misinterpreted his comments to mean he was accusing the Taliban and @placeholder of collusion.