President Trump’s social media director Dan Scavino has been reprimanded for a tweet that violated the Hatch Act, which prohibits government employees from interfering in campaign activities.

In a letter to watchdog group Citizens for Responsibility and Ethics in Washington (CREW), which filed a complaint about one of Scavino’s tweets, the Office of Special Counsel wrote, “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 tweet in question is from April, when Scavino wrote, “@justinamash is a big liability. #TrumpTrain, defeat him in primary.”

Justin Amash is a Republican congressman from Michigan, who has been a vocal critic of Trump.

The purpose of the Hatch Act, passed in 1939, is to “ensure that federal programs are administered in a nonpartisan fashion, to protect federal employees from political coercion in the workplace, and to ensure that federal employees are advanced based on merit and not based on political affiliation,” according to the Office of Special Counsel’s website.

Get our Politics Newsletter. The headlines out of Washington never seem to slow. Subscribe to The D.C. Brief to make sense of what matters most. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Tessa Berenson at tessa.berenson@time.com.