President Barack Obama has had a good week.
First, Congress salvaged his trade agenda, setting the stage for passage of a sweeping free-trade agreement. Then, on Thursday, the U.S. Supreme Court kept his health-care law intact, preserving his signature domestic achievement.
Not bad for someone written off as a lame-duck president after his party's 2014 midterm defeats – or even a couple of weeks ago when House Democrats stymied (temporarily) his trade agenda.
The last outstanding legacy item this month for Obama is achieving a nuclear deal with Iran, which might be the most difficult of all.
But if Thursday's Supreme Court decision is a win for Obama, it's also a win for Republicans – even if they're not jumping up and down with joy.
Had the Supreme Court invalidated the subsidies in some 30 states operating on the federal insurance marketplace, that would have affected nearly 6.4 million Americans, who would have seen their health costs skyrocket by about 300 percent.
Republicans were ready to blame Obama for the potential chaos. But some of them acknowledged the GOP would get the brunt of the blame, especially since they backed the lawsuit challenging the subsidies.
“[Obama will] have the ads all racked up with the individuals that have benefited from Obamacare on the backs of the American taxpayer,” Sen. Ron Johnson, R-Wis., admitted in an April interview.
Republicans also had been divided on how to respond. Some like Johnson wanted to extend the subsidies for Americans – in exchange for repealing the law's individual mandate. But others were in favor of letting the subsidies die, full stop.
And as past political battles have shown, the side that's divided usually loses.
"Phew, that fight could have killed us," a prominent GOP member told NBC's Luke Russert.
There's one other benefit for Republicans from the Supreme Court's ruling: They can continue to rail against the law without providing a real legislative replacement.
That's especially true for the Republicans running for president.
"As president of the United States, I would make fixing our broken health care system one of my top priorities," Jeb Bush said in a statement. "I will work with Congress to repeal and replace this flawed law with conservative reforms."
Added Sen. Marco Rubio, R-Fla.: “Despite the Court’s decision, ObamaCare is still a bad law that is having a negative impact on our country and on millions of Americans. I remain committed to repealing this bad law and replacing it with my consumer-centered plan."
But with the court's ruling, those plans don't have to be spelled out in detailed form – with all the tradeoffs (some of them unpopular) than come from any reform.