A tweet by White House social media director Dan Scavino Jr. urging supporters of President Trump to challenge a GOP lawmaker may have violated a federal law that prohibits officials from using their positions for political activity, ethics experts said.

On Saturday, Scavino went after Representative Justin Amash of Michigan, calling him “a big liability” in a tweet from his personal account. “#TrumpTrain, defeat him in primary,” he added.

Amash is a member of the House Freedom Caucus, which Trump blames for derailing legislation that would have repealed parts of the 2010 Affordable Care Act.

Even though Scavino was tweeting from his personal account, the page at the time listed his official White House position and featured a photo of him inside the Oval Office, noted Richard Painter, who served as the chief White House ethics lawyer in the George W. Bush administration.

“You can't just load up your personal Twitter page with a lot of official stuff,” Painter said. “This is way over the top. It’s not a personal page. It's chock full of official stuff.”

Painter said he thinks Scavino's tweet violated the Hatch Act, which prohibits the use of one's office for political purposes.

“We would have fired him” in the Bush White House, he said. “This is use of official position for a partisan election. You can’t avoid it.”

A White House official said the tweet did not violate the Hatch Act “as it clearly comes from his personal account and not his official White House account.”

Loading....

“He created an official account upon entering the White House to ensure compliance with the Hatch Act, and he has taken the necessary steps to ensure there is a clear distinction between both Twitter accounts,” the official said.

By Sunday morning, Scavino had changed the biography on his personal Twitter page, removing the reference to his current post at the White House and noting solely that he was director of social media for Trump's campaign. He also altered the photo at the top of his personal and official pages, removing images of Trump supporters at a rally holding signs.

Scavino's missdirected Twitter bio

However, the profile photo on his personal account is still an image of Scavino inside the Oval Office. And in his apparent haste, he typed the wrong handle for the president, using @realDonaldTump instead of @realDonaldTrump. After the Washington Post noted the typo, Scavino removed the reference to Trump's handle.

Later Sunday, Scavino rejected the suggestion that he had done anything wrong when asked by a reporter on Twitter if he had a response to the ethics lawyers who say he violated the Hatch Act.

The controversial orders Donald Trump has already issued Show all 9 1 /9 The controversial orders Donald Trump has already issued The controversial orders Donald Trump has already issued Trump and the media White House Press Secretary Sean Spicer takes questions during the daily press briefing Getty Images The controversial orders Donald Trump has already issued Trump and the Trans-Pacific Partnership Union leaders applaud US President Donald Trump for signing an executive order withdrawing the US from the Trans-Pacific Partnership negotiations during a meeting in the Roosevelt Room of the White House in Washington DC. Mr Trump issued a presidential memorandum in January announcing that the US would withdraw from the trade deal Getty The controversial orders Donald Trump has already issued Trump and the Mexico wall A US Border Patrol vehicle sits waiting for illegal immigrants at a fence opening near the US-Mexico border near McAllen, Texas. The number of incoming immigrants has surged ahead of the upcoming Presidential inauguration of Donald Trump, who has pledged to build a wall along the US-Mexico border. A signature campaign promise, Mr Trump outlined his intention to build a border wall on the US-Mexico border days after taking office Getty Images The controversial orders Donald Trump has already issued Trump and abortion US President Donald Trump signs an executive order as Chief of Staff Reince Priebus looks on in the Oval Office of the White House. Mr Trump reinstated a ban on American financial aide being granted to non-governmental organizations that provide abortion counseling, provide abortion referrals, or advocate for abortion access outside of the United States Getty Images The controversial orders Donald Trump has already issued Trump and the Dakota Access pipeline Opponents of the Keystone XL and Dakota Access pipelines hold a rally as they protest US President Donald Trump's executive orders advancing their construction, at Columbus Circle in New York. US President Donald Trump signed executive orders reviving the construction of two controversial oil pipelines, but said the projects would be subject to renegotiation Getty Images The controversial orders Donald Trump has already issued Trump and 'Obamacare' Nancy Pelosi who is the minority leader of the House of Representatives speaks beside House Democrats at an event to protect the Affordable Care Act in Los Angeles, California. US President Donald Trump's effort to make good on his campaign promise to repeal and replace the healthcare law failed when Republicans failed to get enough votes. Mr Trump has promised to revisit the matter Getty Images The controversial orders Donald Trump has already issued Donald Trump and 'sanctuary cities' US President Donald Trump signed an executive order in January threatening to pull funding for so-called "sanctuary cities" if they do not comply with federal immigration law AP The controversial orders Donald Trump has already issued Trump and the travel ban US President Donald Trump has attempted twice to restrict travel into the United States from several predominantly Muslim countries. The first attempt, in February, was met with swift opposition from protesters who flocked to airports around the country. That travel ban was later blocked by the Ninth Circuit Court of Appeals. The second ban was blocked by a federal judge a day before it was scheduled to be implemented in mid-March SANDY HUFFAKER/AFP/Getty Images The controversial orders Donald Trump has already issued Trump and climate change US President Donald Trump sought to dismantle several of his predecessor's actions on climate change in March. His order instructed the Environmental Protection Agency to reevaluate the Clean Power Plan, which would cap power plant emissions Shannon Stapleton/Reuters

“What 'ethics lawyers?' The ones from the Obama Admin who want to take Trump down, or the Bush Admin who were #NeverTrump? No thanks!” he wrote.