A California man with a history of weapons arrests was free on bail when prosecutors say he shot and killed a sheriff's deputy last weekend in the line of duty, according to charges filed Tuesday.

David Machado, 37, pleaded not guilty to gunning down Stanislaus County Sheriff's Deputy Dennis Wallace on Sunday near Modesto, then stealing a car to drive 150 miles to a small town where he was arrested after trying to steal a woman's purse.

He is charged with the deputy's first-degree murder, making him eligible for a death sentence. The Stanislaus County District Attorney's Office, however, has not said what punishment it intends to seek.

Machado on Tuesday made his first appearance in a Modesto courtroom to hear the charges that also include first-degree robbery, carjacking and being a felon in possession of a gun.

He had been convicted in 2009 of a felony for possessing a dangerous weapon, the complaint said, without specifying the type of weapon.

More recently, he posted bail after being arrested in August and charged with being the felon in possession of a firearm.

Machado failed to appear for trial Oct. 31, said Chief Deputy District Attorney John Goold. Wallace was killed two weeks later.

Goold declined to comment on the circumstances of Machado's arrest in August, and the prosecutor said he did not know the bail amount.

On Sunday morning, Wallace, a 20-year veteran of the sheriff's department, came upon a parked van and reported it to dispatchers. It came back as stolen, so Wallace requested backup. Fellow deputies found Wallace shot twice in the head.

Stanislaus County Sheriff Adam Christianson has called the deputy's killing an "execution."

Machado was arrested four hours later in the small Central California town of Lindsay, after a woman fought him off in an attempted purse-snatching and called for help, authorities have said.

Machado remains in jail on the murder charge with no possibility of release on bail.

The Stanislaus County Public Defender's Office, which represents Machado, did not immediately respond to a request for comment by The Associated Press.