In the tightly orchestrated transition that included Sebelius' resignation late Thursday and Obama's quick appointment of well-regarded budget director Sylvia Mathews Burwell as Sebelius' replacement, the political calculus was clear:
Having stood by Sebelius during a painful few months when Obamacare's rollout was marred by a balky enrollment web site, stinging criticism from Republicans and falling popularity ratings for Obama, the White House saw a chance to reset the national conversation over Obamacare amid good news, and with a new face in charge of the program.
Sebelius leaves at a time when most of the web site's problems have been fixed and enrollment in private health insurance programs through the Affordable Care Act has soared past the first-year goal of 7 million - a result that seemed unimaginable during the program's darkest days last fall.
For Obama and his fellow Democrats, one of the political risks of Sebelius leaving office during Obamacare's launch was that the Senate confirmation hearings that would follow for her replacement would amount to an embarrassing review of Obamacare's shortcomings.
Sebelius' departure is an indication that the White House, with Obamacare showing signs of success, is now ready have such a public, national debate over the program during Burwell's confirmation hearings.
As a fresh face steering the healthcare initiative, Burwell will have the advantage of not being "saddled with all the baggage of the political fights that came before," said one senior U.S. official who was not authorized to speak publicly.
White House officials said on Friday that Sebelius, a former Kansas governor, was not pushed out as secretary of Health and Human Services. They said she approached Obama last month about leaving.
However, Sebelius had given people close to the administration the impression that she had planned to stay in her job at least through the Nov. 4 elections, when control of Congress will be at stake.
In announcing Sebelius' departure and Burwell's appointment in the White House's Rose Garden on Friday, Obama seemed to emphasize Burwell's competence.
He described Burwell as a "proven manager" who "knows how to deliver results," a quality needed because of the "big challenges" that lie ahead for Obamacare, which is designed to help millions of uninsured and under-insured Americans.
Republicans say the program robs many Americans of healthcare choices and is too costly, an argument that could be fueled this summer, when insurers begin to set premiums for 2015.
Some analysts are predicting that the rates for coverage under Obamacare will soar next year, and a few insurers are predicting double-digit percentage increases in premiums.
Word of the 2015 premiums will begin to spread about the time that many Americans are likely to begin focusing on the November elections.
Republicans are widely expected to retain control of the 435-seat House of Representatives in the elections. The real battle will be for the 100-seat Senate, where Democrats are trying to prevent Republicans from gaining the six seats they need to win control of that chamber, and therefore all of Congress.
From Democrats' perspective, that makes it critical that Obama's administration have an effective response to the hundreds of millions of dollars in Republican-backed, anti-Obamacare ads that are likely to saturate American media this summer and fall.
"We've only seen the first chapter of this book," Merle Black, a political science professor at Emory University in Atlanta, said of Obamacare and the political fallout to it.
"There's a lot more to come. You're changing the pilot, but it's still unclear how well the plane is operating," he said.
Obama's selection of Burwell makes clear that he intends to keep a tight leash on the handling of his top domestic initiative as it faces a new series of challenges.
As director of the White House's Office of Management and Budget, Burwell saw enough about Obamacare's rollout to become familiar with its problems and Obama's concerns about them, the senior U.S. official said. She would have a direct line to the president in her new position, the official added.
Whether Burwell will be able to generate more momentum for Obamacare is an open question.
The White House, however, is signaling that it plans an aggressive push for Obamacare that will be designed in part to raise the spirits of Democrats and provide a strong counter-argument to Republicans' attacks.
Democrats are particularly focused on helping senators such as Louisiana's Mary Landrieu, Arkansas' Mark Pryor and Alaska's Mark Begich, all of whom voted for the Affordable Care Act, are trying to fend off tough challenges from Republicans and are facing a barrage of Republican-backed ads blasting them and Obamacare.
As enrollment in Obamacare coverage soared during the weeks before last month's deadline to sign up for 2014 coverage, Obama was increasingly forceful in defending the law that will be a large part of his legacy as president.
During a forum this week in Austin, Texas, to honor the 50th anniversary of the Civil Rights Act that Democratic President Lyndon Johnson steered through Congress, Obama cast his own healthcare law as an extension of Johnson's aim-high approach to social legislation.
"What the hell's the presidency for, if not to fight for causes you believe in" Obama asked.
Burwell's Senate confirmation hearings, the continuing debate over Obamacare and the November elections will test that stance, as Obama will try to persuade Americans not to return control of Congress to the Republicans.
History is on the Republicans' side: The party in power in the White House typically loses congressional seats in midterm elections.
If Republicans manage to gain control of the Senate in addition to the House, Obama would be unlikely to get any significant legislation through Congress during his last two years as president.
BUMPS AND BRUISES
Burwell is well-regarded by many Republicans and is virtually certain to get the 51 Senate votes she needs to be confirmed as HHS secretary. A year ago, she was confirmed to the budget post by a 96-0 vote in the Senate.
But Republicans who have been vocal in opposing Obamacare - and there are many - are indicating they want to use her hearings to put Obamacare on trial, and make sure that it stays in the spotlight as the elections approach.
"Secretary Sebelius' departure doesn't change the fact that the president's healthcare law is fundamentally flawed," said Republican Senator Roy Blunt of Missouri.
As he looked toward Obamacare's next challenges on Friday, Obama put a coda on Sebelius' tenure by referring to the tense, often chaotic rollout of the program's web site and its eventual success in signing up about 7.5 million people for health coverage.
"She's got bumps, I've got bumps, bruises," Obama said before adding that Sebelius and her team "got it fixed, got the job done. The final score speaks for itself."