UNITED NATIONS — Confronting setbacks and success in the Muslim world, President Barack Obama condemned the killing in Afghanistan of that country's former president Tuesday, even as he promised support for the Libyan people as they grope for democracy.
"We will not be deterred from creating a path whereby Afghans can live in freedom, safety, security and prosperity," Obama said after meeting with Afghan President Hamid Karzai on the sidelines of the U.N General Assembly.
The fast-moving diplomacy came as Obama opened two days of meetings at the United Nations, where a brewing showdown over Palestinian statehood loomed over much else. And Obama's scheduled remarks on Libya were quickly shadowed by the bad news from Afghanistan, where officials said former President Burhanuddin Rabbani, who headed a government peace council set up to facilitate contacts with Taliban insurgents, was assassinated by a suicide bomber concealing explosives in his turban.
The development was a harsh blow to peace efforts after a decade of war, and Obama addressed it after meeting privately with Karzai, who was cutting short his visit to New York to return to his country.
Obama called it a "tragic loss" but vowed not to be deterred. "And it's going to be important to continue efforts to bring all elements of Afghan society together to end what has been a senseless cycle of violence," the president said.
By his side, Karzai thanked Obama, and said that Rabbani was "an Afghan patriot who as we see has sacrificed his life for the sake of Afghanistan and for the people of our country. The mission that he had undertaken was vital to the Afghan people and for the security of our country and the peace of our country. We will miss him very, very much."
Also on the leaders' agenda was the U.S. troop presence in Afghanistan, where Obama plans to withdraw more than 30,000 U.S. troops by the end of next summer with the aim of putting the Afghans on a path toward taking full control of their own security by the end of 2014. Some U.S. troops are expected to stay in Afghanistan well beyond that time, and the two countries are working on an agreement governing the U.S. military presence.
Earlier, in remarks on Libya at a high-level United Nations meeting, Obama warned that there would still be difficult days ahead as Moammar Gadhafi loyalists make a final stand and the country's provisional leadership grapples with the complex task of setting up a new government. But Obama said it was clear that Libya was now in the hands of the people.
"After decades of iron rule by one man, it will take time to build the institutions needed for a democratic Libya. I'm sure there will be days of frustration," Obama said. "But if we have learned anything these many months, it is this — do not underestimate the aspirations and will of the Libyan people."
"Just as the world stood by you in your struggle to be free, we will now stand with you in your struggle to realize the peace and prosperity that freedom can bring," he said.
Obama praised the international community for having "the courage and the collective will to act" in Libya. He said that while global powers cannot and should not intervene every time there is an injustice in the world, there are occasions when nations must join forces to prevent the killing of innocent civilians.
Obama was joined at the meeting on Libya by other world leaders and representatives of Libya's National Transitional Council. Prior to the gathering, Obama met one-on-one with the NTC's chairman, Mustafa Abdul-Jalil.
The U.S. now recognizes the NTC as Libya's legitimate government. Obama announced Tuesday that the U.S. ambassador was heading back to Tripoli to lead a newly reopened American embassy there.
Obama called on Jalil and other NTC leaders to ensure a timely democratic transition in Libya, including free and fair elections.
Looming over Obama's meetings Tuesday was the approaching clash over Palestinian statehood.
Palestinian leader Mahmoud Abbas said that despite being under "tremendous pressure" to drop the effort, he plans to ask the U.N. Security Council to grant Palestinians full membership, a bid certain to be vetoed by the U.S.
U.S. officials are insisting there is still time to avoid a divisive showdown, and have been working with Western allies in hopes of a last-minute compromise. Obama was to address the world body on Wednesday.
The Palestinian statehood bid is also a domestic concern for Obama, who faces skepticism from some Jewish voters who believe he's anti-Israel. Congressional lawmakers from both parties are also threatening to cut off $500 million in economic and security assistance to the Palestinians if they move forward with the U.N. bid.
Obama is also using his time in New York to raise money for his re-election bid. The president spoke at one fundraiser Monday night and was to speak at another Tuesday night, both to raise money for his campaign and for the Democratic National Committee.
Julie Pace can be reached at http://twitter.com/jpaceDC