President Obama charted a middle course Wednesday for ending the U.S. military involvement in Afghanistan, outlining a departure plan that will remove troops faster than his commanders had requested but more slowly than many of his political allies would like.

In a prime-time address from the White House, Obama said he will bring home 10,000 U.S. troops by the end of the year and 23,000 more by next summer, a withdrawal window that will conclude two months before voters decide whether to give him a second term. The first troops will leave Afghanistan next month.

“Tonight,” the president said from the East Room, “we take comfort in knowing that the tide of war is receding.”

In contrast to his 2009 decision to send additional forces to Afghanistan, Obama appeared to give greater weight this time to the growing impatience of a war-weary public and a skeptical Congress, whose members have been demanding a rapid drawdown and a narrower mission after nearly a decade of battle.

Obama was a relatively new commander in chief when he authorized the troop “surge” 18 months ago. Today he is a candidate for reelection at the head of a party deeply opposed to the war, and he emphasized his push to end the U.S. military presence in Afghanistan and Iraq to “reclaim the American dream that is at the center of our story.”

“Over the last decade, we have spent $1 trillion on war, at a time of rising debt and hard economic times,” he said in a 13-minute address that sounded at times like a campaign speech. “America, it is time to focus on nation-building here at home.”

Obama’s decision drew a measured response from Capitol Hill, where some Democrats indicated that they will continue to pressure the president for a faster withdrawal.

In a statement, Sen. Carl M. Levin (D-Mich.), the chairman of the Armed Services Committee, called the plan a “positive development, although in my view the conditions on the ground justify an even larger drawdown of U.S. troops.”

Sen. John McCain (R-Ariz.) said in a statement that he is “concerned that the withdrawal plan that President Obama announced tonight poses an unnecessary risk to the hard-won gains that our troops have made thus far in Afghanistan and to the decisive progress that must still be made.”

He added: “This is not the ‘modest’ withdrawal that I and others had hoped for and advocated.”

Obama’s plan will also influence U.S. allies in Afghanistan, which supply about 40,000 troops — about 30 percent of the international forces there. Some European leaders are as eager as Obama to end their expensive and politically unpopular commitments to the Afghanistan war effort, and they welcomed the president’s announcement.

On Thursday, French President Nicolas Sarkozy said France will pull its 4,000 troops out of Afghanistan on the same staggered timetable as the U.S. withdrawal. German Foreign Minister Guido Westerwelle said his country wants to reduce the German contingent of 4,900 troops by the end of 2011--but has not yet formulated a withdrawal plan.

Afghan President Hamid Karzai, who along with Pakistani President Asif Ali Zardari and European leaders was briefed by Obama in advance of the speech, also cheered Obama’s announcement, saying “today is a very happy day” for Afghanistan.

“We thank the international communities for their help and services to our country, and Afghanistan will always be thankful to them,” Karzai told reporters.

But the Taliban said it considered Obama’s drawdown plan “only as a symbolic step which will never satisfy the war-weary international community or the American people.”

Obama’s plan covers the withdrawal of the 33,000 troops that he ordered to Afghanistan at the end of 2009, when he also set July 2011 as the date they would begin coming home.

That decision, largely consistent with the request of his military commanders, followed a months-long strategy review designed to correct the downward course of a conflict that Obama as a candidate called “the war we need to win.”

The pullout schedule he outlined Wednesday will leave 68,000 U.S. troops in Afghanistan by the end of next summer, and Obama said their departure will continue steadily through 2014, when the Afghan army is scheduled to take over security.

Obama’s military commanders had requested that the bulk of the surge forces remain in Afghanistan through the end of next year, giving them another full fighting season at nearly current strength in addition to the one underway.

In the past week, the president met three times with his national security team, sessions that included Gen. David H. Petraeus, the commander of international forces in Afghanistan, whom he has nominated to head the CIA.

Petraeus presented Obama with a range of withdrawal proposals — some, administration officials acknowledged, that would keep the surge forces in Afghanistan far longer than Obama had envisioned. But the adopted plan, those officials said, has the military’s support.

“The president’s decision was fully within the range of options presented to him,” said one senior administration official, who, like others, spoke on the condition of anonymity to describe the plan.

Military officers had sought the additional time with the surge forces to consolidate battlefield gains that remain, in their assessment, “fragile and reversible.”

They also argued that maintaining pressure on the battlefield would benefit U.S. efforts to broker a reconciliation between Karzai, an unpredictable ally, and the Taliban, which the administration has determined cannot be eliminated as a political force.

But administration officials said Wednesday that the surge has already done its job by bringing the Taliban to the negotiating table.

“Thanks to the pressure delivered by the surge, we’re in active support of Afghan initiatives to reach out to the Taliban and explore what might be possible by way of a political settlement,” said a second administration official. “And there are openings today that simply didn’t exist 18 months ago.”

In the weeks preceding his decision, Obama confronted mounting criticism of maintaining a large U.S. presence in Afghanistan at a time of economic distress and fiscal constraint at home.

Administration officials said Vice President Biden, who led a faction of civilian advisers who argued against a large troop surge in 2009, is pleased with Obama’s withdrawal schedule, even though it is not as quick as Biden had hoped it would be.

Biden and other senior White House officials, including national security adviser Thomas E. Donilon, had pushed for a significantly larger number of the surge forces to return by the end of this year.

The war effort costs the United States about $10 billion a month — a figure some congressional leaders have called “unsustainable” — and a majority of Americans no longer think the battle is worth fighting. Since the surge began, 684 U.S. troops have been killed in Afghanistan.

Even congressional Republicans, long the bedrock of support for Obama’s war policy, have called for a faster drawdown and a sharper focus on destroying al-Qaeda rather than rebuilding Afghanistan.

Obama’s own party long ago turned against the mission. More recently, some leading Democratic foreign policy figures, as well administration allies, have called for a new approach to take advantage of recent changes on the ground.

Those include the killing in May of Osama bin Laden in Pakistan, a sanctuary for al-Qaeda and Taliban leaders, where many war skeptics believe the real enemy resides.

“We haven’t seen a terrorist threat emanating from Afghanistan for the past seven or eight years,” said a third senior administration official, describing the reasoning behind the withdrawal. “The threat has come from Pakistan over the past half-dozen years or so, and longer.”

Special correspondents Sayed Salahuddin and Javed Hamdard in Kabul and staff writer Felicia Sonmez and staff researcher Julie Tate in Washington contributed to this report.