SCOTTSDALE, Ariz. (AP) — Scottsdale police say man fatally shot by a federal agent during an arrest attempt had been convicted in a human trafficking case but failed to appear in court to be sentenced.

Police say a Homeland Security Investigations officer shot 48-year-old Erik Dunham on Friday after Dunham pulled out a gun when the agent approached him in a parking lot.

Maricopa County Superior Court records say Dunham pleaded guilty to illegal control of an enterprise. He previously faced that charge and numerous counts of prostitution-related crimes.

Records say Dunham failed three times to appear for sentencing before a warrant was issued. One time his lawyer said Dunham had the flu. Neither he nor his attorney appeared for the third hearing.

Court records list a Tucson address for Dunham.