An agent used a spray to deter people who were trying to prevent the man’s detention on Sunday at the Fiesta Market in Lamont, Calif., southeast of Bakersfield.