The new sheriff wanted to ban cowboy hats and boots in favor of a more uniform and what he deemed "professional" attire, prompting the deputy to hang it up after decades of law enforcement.

Cowboys hats and boots will no longer be allowed if you want to be a deputy in one Wyoming county — a move so odious to one longtime deputy that it caused him to quit.

The new sheriff of Sublette County, Stephen Haskell, banned deputies from wearing western attire as part of a new dress code, according to an Associated Press report.

Instead, deputies will have to wear black trousers, a tan shirt, black boots, and a black ball cap in order to meet the new code, with the argument that the change was necessary to improve uniformity and safety.

Haskell said that while he was “very much for the Western way of life and the look,” and he indeed dresses that way himself, deputies should look professional and part of that is looking the same, as “one team unified in one purpose,” according to the report.

The 53-year-old sheriff has been in law enforcement for three years. He said that cowboys boots can be slippery on the ice, and cowboy hats can be whipped away by the wind.

The move did not sit well with Deputy Gene Bryson, who has been with the department for 28 years and spent 40 years in law enforcement. He abruptly retired after being forced to give up his typical attire: a brown cowboy hat, brown cowboy boots, and a leather or wool vest, depending on the season.

Bryson told a local newspaper that he had no intention of changing after 40 years in the sheriff’s office, and the new policy was “kind of the reason why I retired.”

Bryson first worked in law enforcement in 1974, and he was born and raised on a Montana ranch. He said he had been wearing a cowboy hat since he was 19 years old.