Lower level police officers may arrest federal law enforcement agents in their jurisdiction when the agent violates a state law for reasons unrelated to law enforcement. In 2014, a federal agent was arrested in Utah by Salt Lake City police for pointing a gun at an Uber driver.
If agents are found to have violated a law in pursuance of their law enforcement duties, they may be shielded from prosecution. In 2000, an FBI sniper who killed an unarmed women during the Ruby Ridge incident was granted legal immunity on the grounds that he acted “honestly and reasonably.”
States sometimes try to “nullify” federal laws. One common target is federal gun control. Earlier this year, a Missouri county passed an ordinance calling for the arrest of federal agents attempting to enforce gun control laws. The constitutionality of nullifications is determined by federal courts on a case-by-case basis.