'Last chapter' hailed in Afghan security plan 10 January 2013 Last updated at 20:50 The US and Afghanistan have reached the "last chapter" in an effort to make Afghanistan secure and sovereign, the US defence secretary has said. Leon Panetta's remarks came as he welcomed Afghan President Hamid Karzai to the Pentagon for talks. Mr Karzai said he was confident the two countries could "work out the modality for bilateral security" during his three-day trip to Washington. The Afghan president is scheduled to meet President Barack Obama on Friday. "After a long and difficult past, we finally are, I believe, at the last chapter of establishing a sovereign Afghanistan that can govern and secure itself for the future," Mr Panetta said on Thursday. We've come a long way towards a shared goal of establishing a nation that you and we can be proud of, one that never again becomes a safe haven for terrorism. Mr Karzai's trip to Washington comes at a crucial time for relations between the two countries. It follows a strained year between the US and Afghanistan, one that saw a series of attacks on US and Nato troops by members of the Afghan military and police and a string of incidents involving US forces that enraged Afghans, including the burning of Korans. A long way On Thursday, Mr Panetta thanked Mr Karzai for visiting US and Afghan wounded at the Walter Reed National Military Medical Center outside Washington, saying the two countries had "created a bond that will not be broken in the future" after fighting side by side. The Afghan president sought to assure Americans that Afghanistan would soon be able to provide for its own security and would never again be threatened by "terrorists from across our borders." The US and Afghanistan are negotiating a bilateral security agreement that will determine the number of US troops to remain after most foreign combat troops leave Afghanistan by the end of next year. On Tuesday, the White House said it was possible that no US troops would remain in Afghanistan beyond 2014. President Obama is planning to pull most of the 66,000 US troops out of Afghanistan - well down from a high of about 100,000. White House officials had previously suggested they favoured keeping between 3,000 and 9,000 US soldiers in Afghanistan after the combat mission ends. Mr Karzai has been reluctant to sign a long-term binding security agreement with the US amid fears it would undermine Afghan sovereignty. Correspondents say he is unwilling to grant US soldiers immunity from prosecution and is unhappy that Afghans are still being held in US-run military prisons on Afghan soil. US and Iraqi authorities reached a similar sticking point in negotiations over the drawdown of US troops from Iraq. Aside from a contingent guarding the embassy, all US soldiers left the country by December 2011.