If marijuana were legalized, Mr. Gonzalez acknowledges saying, the drug-related violence across the border in Mexico would cease. He then brought up an organization called Law Enforcement Against Prohibition that favors ending the war on drugs.

Those remarks, along with others expressing sympathy for illegal immigrants from Mexico, were passed along to the Border Patrol headquarters in Washington. After an investigation, a termination letter arrived that said Mr. Gonzalez held “personal views that were contrary to core characteristics of Border Patrol Agents, which are patriotism, dedication and esprit de corps.”

After his dismissal, Mr. Gonzalez joined a group even more exclusive than the Border Patrol: law enforcement officials who have lost their jobs for questioning the war on drugs and are fighting back in the courts…

“More and more members of the law enforcement community are speaking out against failed drug policies, and they don’t give up their right to share their insight and engage in this important debate simply because they receive government paychecks,” said Daniel Pochoda, the legal director for the American Civil Liberties Union of Arizona, which is handling the Miller case.