Over his decades in real estate, Donald Trump was seemingly able to get away with anything, emerging from each consecutive bankruptcy and scandal ever more famous and with his brand ever more marketable.

As a candidate, he declared he could shoot someone in the middle of New York’s Fifth Avenue and not “lose any voters.”

But as president, Trump is running up against the limits of saying or doing whatever he wants.

The revelation by Rudy Giuliani that his client reimbursed his longtime personal attorney Michael Cohen for a $130,000 hush money payment to porn actress Stormy Daniels contradicted Trump’s own previous denials that he knew anything about the deal — and, despite Giuliani’s intent to tamp down concerns that the October 2016 payment violated campaign finance laws, raised a whole new set of questions about whether Trump failed to disclose a personal loan.

“As long as they believe that all that matters is the base and Fox News, they’ll keep doing it,” said Rick Wilson, a Republican strategist who has been critical of Trump’s presidency. “But at some point, when the law is the issue and not Trump’s bubble, you end up in a situation where he can’t just lie his way out of every single box.”

The attempted clean-ups have proved damaging to those around Trump, too.

For much of his brief political career, Trump has been dogged by problems of his own making, with efforts to cut off one crisis creating even bigger controversies down the road.

In the wake of revelations that Donald Trump Jr. met during the 2016 campaign with a Kremlin-connected operator who promised “dirt” on Hillary Clinton, Trump and aides huddled on Air Force One and drafted a statement that the meeting was merely to discuss adoption policy.

That story was quickly disproved, and now the episode is of interest to special counsel Robert Mueller as he investigates possible collusion between Moscow and the Trump campaign.

Before the Air Force One huddle, there was the episode that led to Mueller’s appointment in the first place: the firing of FBI director James Comey.

The latest firestorm again sent the White House into damage control.

Trump was warned by close aides that the move could be politically disastrous, but he went ahead anyway, tapping Attorney General Jeff Sessions and Deputy Attorney General Rod Rosenstein to draft a memo to justify the firing.

That document focused on Comey’s handling of the Clinton email investigation — but Trump subsequently undermined that explanation, declaring on NBC News that he had fired Comey because of the Russia investigation. Trump then reportedly boasted in a meeting with senior Russian officials that firing Comey had taken “great pressure” off him.

That episode, too, is now a focus for Mueller.

The attempted clean-ups have proved damaging to those around Trump, too.

Last fall, amid criticism from a Democratic congresswoman about Trump’s comments to the widow of a Special Forces soldier killed in Niger, chief of staff John Kelly took the briefing room podium and misrepresented remarks the congresswoman gave at a 2015 event.

Former Press Secretary Sean Spicer was mocked on late night television for his infamous declaration that the administration’s travel ban was “not a travel ban,” only to have Trump declare it exactly that on Twitter.

The latest firestorm again sent the White House into damage control, with Giuliani’s remarks to Fox News’ Sean Hannity, along with the comment that the president “did know about the general arrangement,” contradicting past denials by Trump, his campaign and the White House.

Giuliani’s declaration also ran counter to Cohen’s claim that he was never reimbursed.

Trump, on Thursday took to Twitter to expand on Giuliani’s case that the payment was not a campaign finance violation, contending that Cohen received a monthly retainer, not from the campaign, “from which he entered into, through reimbursement, a private contract between two parties, known as a non-disclosure agreement, or NDA,” Trump wrote.

“These agreements are very common among celebrities and people of wealth.”

Trump has joined Cohen in a New York courtroom to limit the government’s access to documents and other materials seized in an FBI raid last month on Cohen’s New York apartment, office and hotel room, citing attorney-client privilege between the president and his longtime lawyer.

Cohen’s lawyers have acknowledged their client is under federal investigation by federal prosecutors in New York, including for potential campaign finance violations.

To Trump’s associates and longtime supporters, the decision to send Giuliani out on TV was textbook Trump. Few are better at exploiting a news cycle and media ecosystem whose hunger for a new development, anything loud or scandalous, is never sated.

Giuliani himself signaled that the timing of the payment to Stormy Daniels was connected to the November 2016 election.

Sam Nunberg, told POLITICO that the president merely sent out his lawyer to explain its position. “Here are the facts as we understand them now, and he hasn’t done anything illegal,” Nunberg said.

“You want to judge him on morality, judge him on morality,” Nunberg added. “But there are no campaign finance issues.”

Yet Giuliani himself signaled that the timing of the payment to Daniels, who claims she began an affair with Trump in 2006, was connected to the November 2016 election.

On “Fox & Friends,” he seemed to imply that campaign considerations played into a payment to Daniels in October 2016, the month before the election. If the money served a political purpose, experts say, it could be considered an undisclosed contribution.

“Imagine if that came out on October 15, 2016, in the middle of the, you know, last debate with Hillary Clinton,” he said on the program. “Cohen didn’t even ask. Cohen made it go away. He did his job.”

On Thursday, Giuliani leaned on another tried-and-true strategy: changing the subject.

Giuliani went on the offensive after an NBC News report that Cohen’s phones had been wiretapped, capturing at least one call between Cohen and Trump.

“I am waiting for the attorney general to step in, in his role as defender of justice, and put these people under investigation,” Giuliani told the Hill in an interview.

NBC News issued a correction to its wiretap story shortly thereafter, reportitng that federal investigators had monitored Cohen’s phone activity using a pen register, which allows them to see who has called in or out, but that they had not listened in on phone conversations via wiretap.