Dan Scavino, the director of social media for President Donald Trump, was found to have violated a federal law prohibiting certain government employees from using their position to engage in some forms of political activity.

On April 1, Scavino took to Twitter to call for challengers to unseat Republican Rep. Justin Amash of Michigan. “ Trump "is bringing auto plants and jobs back to Michigan," Scavino tweeted." @justinamash is a big liability. #TrumpTrain, defeat him in primary,” Scavino wrote.

Besides the obvious public spat that this encouraged, pitting the administration against the conservative House Freedom Caucus during the initial fight for a health-care overhaul, Scavino also violated the Hatch Act, according to the U.S. Office of Special Counsel.

Citizens For Responsibility and Ethics in Washington filed the initial complaint against Scavino to OSC, which replied in a letter written by chief of the Hatch Act Unit, Ana Galindo-Marrone.

“Specifically, you alleged on April 1, 2017, Mr. Scavino, while invoking his official position at the White House posted a tweet calling for the defeat of Representative Justin Amash in a primary election,” Galindo-Marrone wrote. “OSC has concluded that this activity violated the Hatch Act.”

Additionally, the letter states that Scavino was issued a “warning letter” and had been counseled by the Office of the White House Counsel.

“Finally, Mr. Scavino has been advised that if in the future he engages in prohibited political activity while employed in a position covered by the Hatch Act, we will consider such activity to be a willful and knowing violation of the law,” the letter concludes.

CREW claimed the letter as a victory and said in a statement to The Daily Beast that they also filed a complaint with the Office of Congressional Ethics against Amash “who used the same account he uses for Congressional purposes to respond and raise money for his campaign.”

“The rules are clear that government officials aren’t allowed to use their position for campaign activity,” CREW Executive Director Noah Bookbinder said. “OSC has made clear with this ruling that they are going to enforce these important rules and work to keep the government free from inappropriate politics.”

A spokesperson for Amash did not immediately respond to a request for comment.

Scavino has worked his way up in Trump's world from golf caddy to general manager of a Trump golf course before he started managing social media during the campaign. Scavino now reportedly posts tweets on the @realDonaldTrump account and the @POTUS account.