President Obama will face a stiff political challenge Wednesday in presenting his plan for a gradual end to the U.S. military involvement in Afghanistan. His prime-time address must remind a skeptical electorate and a concerned Congress that the country’s longest war remains worth fighting — and funding — for several more years.

Obama’s generals have requested more time to consolidate the gains they say have been made since the president dispatched 33,000 additional U.S. troops to the country last year. The escalation, which angered his party’s antiwar base, followed a months-long strategy review to determine how to salvage a flagging war effort.

Since then, public opinion has turned increasingly against the war, except for a now-diminishing boost in approval after the killing of Osama bin Laden in May.

As he begins the promised withdrawal, Obama’s challenge will be to provide his generals with the resources to wage the war’s final phase while persuading Congress that, at a time of fiscal strain, maintaining most of a $10 billion-a-month war effort is worthwhile.

“The process [leading to the decisions to be announced Wednesday] was all about the mission that was laid out in December of 2009, the surge in forces that followed from that decision and that mission, and the evaluation of the success that we’ve had since that mission began,” Jay Carney, Obama’s press secretary, told reporters Tuesday. “Having said that, we are always mindful of the fact that, as powerful and wealthy as this country is, we do not have infinite and unlimited resources, and we have to make decisions about how to spend our precious dollars and, more importantly, how and when to use military force.”

Obama made his decision early Tuesday and informed only a small number of senior advisers of his plan. Even drafts of his speech, which he will deliver at 8 p.m. from the White House, circulated late Tuesday without final withdrawal numbers.

But the broad outline of the plan is likely to include the removal of 5,000 troops this summer with an additional 5,000 by the end of the year, according to administration officials familiar with the White House deliberations.

That would leave 23,000 troops in Afghanistan from the surge forces that Obama endorsed after the strategy review in 2009. Those troops will likely all be brought home by the end of 2012, giving his generals another full fighting season after this one with the bulk of the surge forces in place.

In Kabul, the Afghan Defense Ministry said Wednesday that it is ready to take responsibility for fighting the Taliban and securing parts of the country that U.S. and allied NATO troops turn over to Afghan security forces.

“There will be some battles” during the transition period, said Gen. Mohammad Zahir Azimi, a Defense Ministry spokesman, according to the Associated Press. “There will be suicide attacks and bomb attacks. . . . But we in the Afghan forces are prepared to replace the foreign forces, and I’m confident the army has enough capacity and ability.”

The Afghan army is scheduled to take responsibility for securing five provincial capitals — including Lashkar Gah in Helmand province — and two provinces by July 20.

If the U.S. plan holds, Obama will have largely granted the request made by his battlefield commanders, who have called gains of the past 18 months “fragile and reversible” unless the current tempo of aggressive operations against the Taliban continues.

In addition, some commanders have argued that efforts to reach a political settlement with the Taliban — a chief goal of the administration as the war nears its 10th anniversary — would benefit from maintaining military pressure. Obama’s strategy review determined the movement could not be defeated as a political force.

Declining troop numbers also will affect the ability of U.S. government civilians, all of whom operate under military protection, to continue to work safely in the field in Afghanistan.

The civilians have their own withdrawal schedule, with plans to pull back gradually from distant outposts where they provide aid and guidance on agriculture, governance, rule of law and other civil matters.

By the end of 2014, when all U.S. troops are scheduled to leave Afghanistan, the civilians are to be moved into four regional consulates that have yet to be opened. About 400 of more than 1,130 civilians are currently based in field locations outside Kabul.

Afghan President Hamid Karzai has announced that seven districts and cities are to be turned over to complete Afghan security control in the coming months, and any U.S. troop departures from those areas will also mean the withdrawal of civilians. But most of the initial “transition” areas already have little or no U.S. or Taliban presence.

Obama’s strategy has married U.S. military and civilian efforts under the general heading of “stabilization.” As the military has cleared areas of the Taliban, civilian experts have moved in to help develop and improve Afghan government services.

Depending on the rate of military withdrawal, civilian experts may find it more difficult to provide hands-on aid.

Although the number of civilian experts is currently scheduled to increase by several hundred and peak in 2014 as troop levels decrease, the amount of money available for U.S. assistance programs is likely to shrink.

The administration has already lowered its initial budget request for fiscal year 2012 from $4.3 billion to just over $3 billion — enough, as one administration official said, to cover slightly more than a week of U.S. military operations at current rates. But Congress is likely to impose substantial further cuts.

As the troop withdrawal begins, the administration is trying to speed up its plans to change commanders in Afghanistan, which could lead to Lt. Gen. John R. Allen taking over for Gen. David H. Petraeus as early as next month.

The hand-over was originally scheduled to take place in September, when Petraeus is supposed to start his new job as director of the CIA. But administration officials are trying to give Petraeus a bit of a breather after years of leading troops in Iraq and Afghanistan, Defense Secretary Robert M. Gates said Wednesday.

“I think we would like to have a change of command somewhat sooner, and it is to give General Petraeus a little time,” Gates said in an interview with The Washington Post. “The last 4 1 / 2 years, it’s been pretty wild for him.”

But Allen’s nomination to become commander of U.S. and NATO forces in Afghanistan, as well as his promotion to four-star general, must be confirmed by the Senate. The Senate Armed Services Committee has scheduled his confirmation hearing for Thursday morning.

Allen most recently served as deputy commander of the U.S. Central Command, based in Tampa. If confirmed, he will be the first Marine to lead all U.S. forces in either the Afghan or Iraq wars. Since last month, Allen has been serving as a special assistant to Adm. Mike Mullen, chairman of the Joint Chiefs of Staff.

Correspondent Pamela Constable in Kabul and staff writer Craig Whitlock in Washington contributed to this report.