A county sheriff in Texas used his office's official Facebook account on Thursday to share a photo in support of Sen. Ted Cruz (R) in a post that has since been removed.

The post, which went live on the department's official Facebook account around 3 p.m. ET and was taken down about an hour later, shows the sheriff of Tarrant County alongside other people smiling and posing with a Cruz campaign sign.

A Fraternal Order of Police guide on political activity for police officers indicates the sheriff's actions may have violated the Hatch Act. The document states that any member of a "state or local agency" cannot "engage in campaigning during working hours." They are also prohibited from using "any official authority for influence for political purposes, including using the officer's official title or authority to coerce individuals to participate in political activity," the FOP's guide says.

The Tarrant County Sheriff's Office did not respond to a request for comment.

A spokesman for the Office of Special Counsel, which prosecutes Hatch Act violations, said in an email to The Hill that campaigning for reelection or another political candidate while in uniform is not a violation when applied to members of local law enforcement, but noted that any use of official resources to do so would cross a line into violation territory.

"The Hatch Act prohibits employees from using their official authority or influence for the purpose of affecting the results of an election," according to an OSC letter provided to The Hill. The letter states that this "includes using agency resources, such as on-duty personnel, to support a candidate and using one's authority to coerce any person to participate in political activity."

Cruz is locked in a tight Senate race against Rep. Beto O'Rourke (D) heading into the Nov. 6 midterm elections. Recent polls show Cruz leading his opponent by single digits.

A government watchdog group filed a Hatch Act complaint against White House counselor Kellyanne Conway earlier this week. OSC determined that she previously violated the act as part of the Trump administration.

First lady Melania Trump's spokeswoman Stephanie Grisham was also warned over violating the act last month after she tweeted a message containing President Trump's campaign slogan.

Updated at 6:52 p.m.