WASHINGTON – In public, President Donald Trump is standing by House Speaker Paul Ryan over the Obamacare replacement bill.

Behind the scenes, the president's aides are planning to blame Ryan if there is an embarrassing defeat on a bill that has been a Republican goal for more than seven years, a senior administration official said. The House is expected to vote Friday afternoon on the health bill, which is opposed by all Democrats and may not enjoy enough support among either conservative or moderate Republicans. The conservative House Freedom Caucus negotiated several changes to the bill to win over its members.

On Thursday, Trump's senior strategist took the unusual step of traveling to Capitol Hill to deliver an ultimatum: take the vote on Friday, win or lose. Ryan had sought to carefully build a majority for the bill, and it would be highly unusual for him to call the vote without knowing if it would pass.

Ryan had little choice but go along with the administration's gambit. Trump said Friday at the White House that Ryan shouldn't lose his job if the bill goes down. He also said "no" when asked if the bill had been rushed or if he regretted pursuing a replacement of the Affordable Care Act ahead of other priorities such as a tax overhaul. But asked whether Trump, Ryan, or the Freedom Caucus chairman, North Carolina Republican Mark Meadows, would be most to blame if the bill fails, the administration official said Ryan. The official insisted on anonymity to discuss internal White House deliberations.

A spokeswoman for Ryan didn't immediately respond to an request for comment.

Several Trump associates have already laid groundwork to blame the speaker, who butted heads with Trump repeatedly before his election.

"I think Paul Ryan did a major disservice to President Trump, I think the president was extremely courageous in taking on health care and trusted others to come through with a program he could sign off on," Chris Ruddy, CEO of Newsmax and a long-time friend of Trump's, said in an interview last week. "The president had confidence Paul Ryan would come up with a good plan and to me, it is disappointing."

A Trump associate who requested anonymity to discuss the president's views on the matter said that White House chief of staff Reince Priebus may also be imperiled.

Trump's core supporters regarded Ryan as at best unimportant during the presidential campaign and at worst a poster child for the sort of establishment, scripted politician they loathed.

Still, Trump, Vice President Mike Pence and top White House aides had been working closely with Ryan on a health bill since the election and were heavily involved in negotiations to reach a deal, according to a senior Republican aide. That leaves questions about whether they'll be able to cooperate to pull the party together on other tough issues, crucially a tax overhaul that Trump has said is a personal priority.