Over a dozen San Antonio police officers violated department policy on Tuesday by greeting GOP nominee Donald Trump at the local airport wearing the campaign’s signature red “Make America Great Again” hats.

“The officers wearing the campaign hats while in uniform violated SAPD policy and will be disciplined appropriately,” San Antonio Police Chief William McManus wrote in a statement published on the department’s Twitter feed, noting that the officers “displayed poor judgment.”

“I expect them to know better than to give the appearance of endorsing a candidate while on duty and in uniform, regardless of the political campaign or the candidate,” McManus added.

Statement from Police Chief William McManus: pic.twitter.com/iBBKvMOpuE — City of San Antonio (@COSAGOV) October 12, 2016

Trump shared a short video of the uniformed officers, whom the San Antonio Express-News reported were from the motorcycle unit, escorting him to his campaign plane.

Thank you Texas! If you haven’t registered to VOTE- today is your last day. Go to: https://t.co/HfihPEA3Sp & get out on 11/8/16 to #MAGA! pic.twitter.com/KlRx4GoO64 — Donald J. Trump (@realDonaldTrump) October 11, 2016

In the 25-second clip on his Twitter feed, Trump says “thank you, fellas” to the officers, who thank him in return and give him the thumbs-up sign. “WE WILL MAKE AMERICA SAFE & GREAT AGAIN, TOGETHER!” the text accompanying the video reads.

Mike Helle, president of the San Antonio Police Officers Association, told the Express News that “You can’t do that kind of stuff while on duty,” but said the officers’ actions seemed “benign.”

Trump’s cozy ties to law enforcement, which he has actively fostered, have come under scrutiny before.

City officials in Phoenix, Arizona sent the Trump campaign a cease-and-desist letter in September over the use of a video still of the real estate mogul shaking hands with Phoenix police officers in a campaign ad.

Phoenix City Attorney Brad Holm said the officers did not know they were photographed or consent to be used in the advertisement, and that the ad “unmistakably and wrongfully suggests that Phoenix and the officers support or endorse Mr. Trump’s campaign.”