Anthony Scaramucci deleted tweets in which he previously criticized Donald Trump hours after accepting his new job as White House communications director on Friday.

Scaramucci also previously expressed support for his boss's old rivals, Hillary Clinton and Barack Obama—even donating money to their campaigns.

In December 2011, Scaramucci referred to the "Trump spectacle" in a tweet about Mitt Romney. Two months later, the new White House pick tweeted a National Journal article about Trump endorsing Newt Gingrich in the 2012 race: “Odd guy. So smart with no judgment.”

The deleted tweets were spotted by freelance journalist Josh Billinson, who Scaramucci briefly blocked.

“I'm just shocked he hadn't deleted them earlier,” Billinson told The Daily Beast. “That he could've been in the running for communications director and not even thought to check what he had publicly said about Trump in the past is wild to me.”

In December 2015, Scaramucci attacked Trump's call for a border wall between Mexico and the U.S.

"Walls don't work. Never have never will. The Berlin Wall 1961-1989 don't fall for it," he tweeted, above a picture of the wall.

Scaramucci, a Wall Street millionaire, also donated to Obama and Clinton's presidential campaigns. Scaramucci gave $5,600 to Obama in 2008 and $4,600 to Clinton in 2007. (Scaramucci wrote in November 2011 that he voted for Obama and Bill Clinton.)

Ahead of the 2016 election, Scaramucci said he hoped Clinton would be the next president.

“I hope she runs [in 2016], she is incredibly competent,” he tweeted in April 2012, adding she was "the real deal."

“I like Hillary," he also tweeted. "Have to go with the best athlete. We need to turn this around.” Another tweet said a “Hillary run makes everyone better.”

He responded to a tweet from Vanity Fair asking “When did Hillary Clinton Become the Coolest Person on the Planet?” by writing: “When she stopped caring about her image.”

By 2015, Scaramucci turned on Clinton: “Hillary will be out of race before Thanksgiving[.] the democratic nominee will be a governor.”

But he was far from pro-Trump.

On a Fox News appearance in August 2015, Scaramucci called Trump a "hack politician" whose rhetoric is "anti-American and very, very divisive." He warned Trump to "cut it out now" and "stop all this crazy rhetoric."

Scaramucci also tweeted a quote from a David Cameron interview where he bashed Trump for “making a fundamental mistake of trying to blame all of Islam and all Muslims for what is the ideology and the actions of a minority.”

"It is a fight within Islam, overwhelming majority see Islam as a religion of peace, want to live in multiracial/ethnic/faith democracies," Scaramucci tweeted.

Scaramucci was a founder of a global investment firm who served as the national finance co-chair for Romney’s 2012 campaign. As soon as Scaramucci was named, Sean Spicer quit as White House communications director.

A month after his critical tweets, Scaramucci citing robocalls Trump made for the Romney campaign.

“Kudos to The Donald for making Gov Romney's journey to the 45th Presidency a touch easier. His support has been invaluable,” he tweeted in March 2012.

Scaramucci endorsed Scott Walker and then Jeb Bush before joining the Trump Finance Committee in May 2016.

The new comms director tweeted that Bush “will make a great president” in 2015.

— Joanna Purpich contributed to this report.