Discuss as:

Obama hails the future of a 'new kind of relationship' with Afghanistan

On the one-year anniversary of the death of Osama bin Laden, President Obama made an unannounced visit to Afghanistan and said his goal "to defeat al-Qaida and deny it a chance to rebuild is now within our reach." NBC's Atia Abawi reports.

Wrapping up a surprise visit to Afghanistan, President Barack Obama made a televised address from the war-torn country to discuss an agreement he signed with President Hamid Karzai, which would see 23,000 U.S. troops withdrawn by the end of the summer. The agreement, he said, hails “a new kind of relationship” that would see the United States in a more supportive role.

“As our coalition agreed, by the end of 2014 the Afghans will be fully responsible for the security of their country," Obama said. But the president was clear that the U.S. would stay engaged into the future.

“The agreement we signed today sends a clear message to the Afghan people. As you stand up, you will not stand alone,” Obama said. “It establishes the basis of our cooperation over the next decade, including shared commitments to combat terrorism and strengthen democratic institutions.”

President Obama’s visit to Afghanistan was kept secret until he met with Karzai. During Tuesday's meeting, which took place around midnight, the two leaders signed a post-war agreement that provides a framework to the U.S.’s commitment to Afghanistan after the long and unpopular war comes to an end.

The agreement opens the possibility for continued training of Afghan forces and targeted operations against al-Qaida, which is present in neighboring Pakistan but has a nominal presence inside Afghanistan.

President Obama goes to Afghanistan to sign post-war agreement

At the podium at Bagram Air Field, Obama noted that 10,000 troops were withdrawn last year and that nearly half the Afghan population lives in areas where Afghan Security Forces are taking the lead.

“The Iraq War is over,” the president said. “The number of our troops in harm's way has been cut in half, and more will be coming home soon. We have a clear path to fulfill our mission in Afghanistan, while delivering justice to al-Qaida.”

On Tuesday night, President Barack Obama addressed the American people from Bagram Air Base in Afghanistan to announce an agreement he signed with President Hamid Karzai: "The goal that I set -- to defeat al-Qaida, and deny it a chance to rebuild -- is within reach." Watch the full speech here.

Still, Obama struck a cautionary note, warning of “more difficult days ahead” and acknowledged that “many Americans are tired of war.” But “we must finish the job we started in Afghanistan and end this war responsibly,” he said.

Transcript of Obama's speech from Bagram Air Base

International troops would continue to train and advise the Afghans, Obama said, and the U.S. would not build permanent bases in Afghanistan or patrol the country's cities and mountains.

The president also said the U.S. would not build permanent bases in Afghanistan or patrol the country’s cities and mountains.

The Afghan Security Forces would grow its force to 352,000 this year, Obama said, and sustain that level for three years.

“That will be the job of the Afghan people,” he said.

Obama planned to be on the ground for about seven hours in Afghanistan, where the United States has been engaged in war for more than a decade following the Sept. 11, 2001, attacks. More than 1,800 U.S. forces have been killed and 15,700 wounded in that time.  

The trip also carries major symbolic significance for a president seeking a second term and allows him to showcase the killing a year ago of 9/11 mastermind Osama bin Laden. 

Media traveling with Obama on the 13-hour flight had to agree to keep it secret until Obama had safely finished a helicopter flight to the nation's capital, Kabul still launch lethal attacks.  

Obama also addressed Pakistan, where bin Laden spent nine years hiding in a safe house in Abbottabad.

“I have made it clear to Afghanistan's neighbor - Pakistan - that it can and should be an equal partner in this process in a way that respects Pakistan's sovereignty, interests, and democratic institutions,” Obama said. “In pursuit of a durable peace, America has no designs beyond an end to al-Qaida safe-havens, and respect for Afghan sovereignty.”

More world news from msnbc.com and NBC News:

Follow us on Twitter: @msnbc_world