The Office of Special Counsel (OSC) has issued a warning to White House social media director Dan Scavino for using Twitter to interfere with an election.

The watchdog group Citizens for Responsibility and Ethics in Washington (CREW) filed a complaint with the OSC after Scavino called for the primary election defeat of Trump critic Rep. Justin Amash Justin AmashInternal Democratic poll shows tight race in contest to replace Amash Centrist Democrats 'strongly considering' discharge petition on GOP PPP bill On The Trail: How Nancy Pelosi could improbably become president MORE (R-Mich.) on Twitter, claiming his actions violated the Hatch Act, which prohibits many government employees from taking part in campaign activities.

“Justin Amash is a big liability. #TrumpTrain, defeat him in primary,” Scavino tweeted in April.

.@realDonaldTrump is bringing auto plants & jobs back to Michigan. @justinamash is a big liability.#TrumpTrain, defeat him in primary. — Dan Scavino Jr. (@DanScavino) April 1, 2017

ADVERTISEMENT

“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,” a letter from the OSC to CREW this week reads.

“The rules are clear that government officials aren’t allowed to use their position for campaign activity,” CREW Executive Director Noah Bookbinder said in a statement Friday.

“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,” he said.

The White House said Scavino immediately responded to the OSC's concerns and cooperated with the counsel. The administration also said he has worked with the Office of the White House Counsel to ensure that the Hatch Act is being followed.

—Updated at 2:25 p.m.