President Donald Trump on Thursday lashed out at Senate Majority Leader Mitch McConnell (R-Ky.) over Republicans’ latest failed attempt to repeal and replace the Affordable Care Act.

Can you believe that Mitch McConnell, who has screamed Repeal & Replace for 7 years, couldn't get it done. Must Repeal & Replace ObamaCare! — Donald J. Trump (@realDonaldTrump) August 10, 2017

He also implored the Kentucky lawmaker to “get back to work” and pass legislation on tax reform and infrastructure spending.

Mitch, get back to work and put Repeal & Replace, Tax Reform & Cuts and a great Infrastructure Bill on my desk for signing. You can do it! — Donald J. Trump (@realDonaldTrump) August 10, 2017

Trump’s comments echoed similar ones he’d made the day before, rebuking McConnell’s claim that the president had been overly optimistic about health care reform.

“Senator Mitch McConnell said I had ‘excessive expectations,’ but I don’t think so,” Trump tweeted on Wednesday. “After 7 years of hearing Repeal & Replace, why not done?”

McConnell had accused Trump of having “excessive expectations” for legislative progress during remarks to a Rotary Club in Kentucky on Monday.

“Part of the reason I think that the storyline is that [lawmakers] haven’t done much is because, in part, the president and others have set these early timelines about things need to be done by a certain point,” he said.

McConnell hinted that Trump’s insistence on haste had made Congress’ failure to repeal the ACA, also known as Obamacare, look more damning than it actually was.

“Our new president, of course, has not been in this line of work before,” McConnell said Monday. “And I think he had excessive expectations about how quickly things happen in the democratic process.”

.@SenateMajLdr: "Our new @POTUS has of course not been in this line of work before, and I think had excessive expectations." pic.twitter.com/TDr9jG6J6f — FOX Business (@FoxBusiness) August 9, 2017

Taking McConnell to the woodshed on social media apparently wasn’t Trump’s first move. Prior to the tweet’s posting, Trump phoned McConnell to complain about the senator’s remarks, The New York Times reported. Trump also reportedly vowed to continue calling for a repeal of Obamacare and urged McConnell to do so as well.

Trump had certainly projected optimism about the prospects of repeal well before there was any real chance of it. In February, he claimed repeal was on track to succeed by the middle of March. It went on to fail in the House in March, before passing in a revised form in May.

Kevin Lamarque / Reuters President Trump has mostly avoided publicly clashing with Senate Majority Leader Mitch McConnell (R-Ky.), at left.

The president rarely lets criticism go unanswered. Trump’s social media director Dan Scavino lambasted McConnell on Twitter earlier on Wednesday for offering “more excuses.”

More excuses. @SenateMajLdr must have needed another 4 years - in addition to the 7 years -- to repeal and replace Obamacare..... https://t.co/6FOVBm6BQU — Dan Scavino Jr. (@DanScavino) August 9, 2017

Trump has issued stinging indictments of trusted allies in the past, including Attorney General Jeff Sessions, his first supporter in the Senate. But this is his first public spat with McConnell, the steely tactician responsible for shepherding the remainder of Trump’s legislative agenda through the notoriously tricky Senate.

In a nod to McConnell on Tuesday, Trump endorsed McConnell’s preferred candidate in the Republican Alabama Senate primary: Sen. Luther Strange (R-Ala.), who has been occupying the seat vacated by Sessions earlier this year.

It is unclear how a chill in relations between Trump and McConnell might affect the GOP agenda. Trump is pushing a bill introduced by Sens. Tom Cotton (R-Ark.) and David Perdue (R-Ga.) that would dramatically reduce legal immigration. He also has ambitious plans to overhaul the tax code and pass a budget with deep spending cuts.

McConnell indeed presided over the narrow defeat of the so-called “skinny” Obamacare repeal bill at the end of July. McConnell appeared to be as blindsided and disappointed in the result ― made possible by Sens. Susan Collins (Maine), Lisa Murkowski (Alaska) and John McCain (Ariz.) breaking with their fellow Republicans ― as Trump was. The bill’s collapse signaled the end of efforts to repeal Obamacare for the foreseeable future.