Trump aide lashes out at Freedom Caucus lawmaker Dan Scavino urged Trump supporters to take down Rep. Amash in his next primary.

 -- The president isn't the only person bashing his Republican detractors on Twitter.

Top White House aide Dan Scavino on Saturday urged President Trump's supporters to take down Rep. Justin Amash -- an outspoken member of the House Freedom Caucus who has repeatedly criticized the commander-in-chief -- in his next primary.

The Michigan Republican lashed back with a hashtag of his own: #Trumpstablishment.

But according to a pair of lawyers from former presidential administrations, Scavino's tweet may be a violation of federal law.

Richard W. Painter, former President George W. Bush's chief ethics lawyer and a vocal critic of the Trump administration who is now part of a watchdog group suing the president for alleged violations of the emoluments clause, suggested that Scavino's tweet may have violated the Hatch Act, a law governing how and when executive branch employees can engage in political campaigning.

According to Office of Special Counsel guidelines, employees may express their opinions about political candidates on social media -- except while "on duty," "in the workplace," or "referring to their official title or position."

Scavino's Twitter account is described as "personal" in the bio, but Painter said that because he uses an official White House photo, lists his title, and regularly tweets content related to his job, his tweet about Amash may have violated the Hatch prohibition against federal employees seeking to influence the result of an election using their official authority.

Daniel Jacobson, who was a lawyer in the Obama administration, also said the tweet appears to be a Hatch Act violation.

Neither the White House nor the Office of Special Counsel responded to requests to comment on Scavino's tweet and the claims of a Hatch Act violation.

Amash and Scavino's Twitter tiff comes on the heels of Trump's pledge to "fight" the Freedom Caucus in 2018.

Several members of the caucus, which consists of several dozen conservative and libertarian lawmakers, refused to support the GOP's Obamacare-replacement bill, scrapped amid rampant party-infighting on March 24.

House Speaker Paul Ryan, who championed the bill, told reporters he understood Trump's frustration.

"He is just expressing his frustration," the speaker said. "I share that frustration ... we haven't gotten to where we need to go."

Nevertheless, Amash responded to Trump's criticism of his caucus, calling the plan "Swampcare" and claiming the president had succumbed "to the D.C. Establishment."

ABC News' Alexander Mallin contributed to this report.