Walter ShaubWalter Michael ShaubPence lands in controversy with stay at Trump hotel Ex-ethics chief rips Trump July 4 event as 'taxpayer-funded campaign ad' Here are the top paid White House staffers MORE, the former director of the Office of Government Ethics, slammed President TrumpDonald John TrumpMarine unit in Florida reportedly pushing to hold annual ball at Trump property Giuliani clashes with CNN's Cuomo, calls him a 'sellout' and the 'enemy' Giuliani says 'of course' he asked Ukraine to look into Biden seconds after denying it MORE's July Fourth "Salute to America" event as a "taxpayer-funded campaign ad."

Trump on Thursday spoke outside the Lincoln Memorial at the event, which prompted widespread criticism from Democrats that the president was politicizing Independence Day. 

"There you have it. A taxpayer- funded campaign ad. Your tax dollars coopted for the benefit of a man whose idea of public service is the public serving him," wrote Shaub, who left the White House in 2017 after clashing with Trump, and has since become a frequent critic of the president.

Shaub works for nonprofit government accountability watchdog group Citizens for Responsibility and Ethics in Washington.

"Tens of millions effectively given to the Trump Campaign. This is what it was all about. This and revenue for his hotel," he added.  

It was reported earlier this week that the National Park Service reallocated $2.5 million to help pay for the event. Its full cost, including military equipment and security, is expected to be greater. 

Some Democrats had called on the president to cancel the event, writing in a letter that it "could create the appearance of a televised, partisan campaign rally on the Mall at public expense."

Trump's speech, which lasted approximately 45 minutes, focused heavily on celebrating the military and largely avoided political rhetoric.