A Sacramento ex-convict suspected in the shooting death of a Rohnert Park man pleaded no contest Wednesday to gun possession charges in a case believed to involve self-defense.

Berry Adams, 32, faces a maximum seven years in prison for his role in the April 2011 shooting of Kevin "Ziggy" Craft, 20 at the Best Western Inn in Rohnert Park on Redwood Drive.

An additional pimping charge will be dropped at his May 10 sentencing, according to a plea bargain with prosecutors.

Adams is alleged to have shot Craft when Craft attempted to rob a prostitute inside one of the motel rooms. Police believe Adams burst in after overhearing the robbery on a cellphone and fired when Craft turned a gun on him.

Adams was not charged with murder because the evidence points to self-defense or the defense of others, prosecutors said.

Adams admitted a single count of being a felon in possession of a firearm with enhancements for prior convictions. He received a "strike" on a 2002 San Francisco burglary conviction and went to prison for theft in San Mateo County in 2005.

Craft's family attended the hearing but declined to comment.