A 33-year-old man accused of fatally shooting one man and wounding another was in fear for his life and acted in self-defense, his attorney told jurors Tuesday.

Joe L. Medina is on trial for first-degree murder and attempted first-degree murder for a 2011 shooting at a midtown apartment complex that left 34-year-old Michael Grijalva dead and injured Julio Colon.

Medina also faces attempted first degree murder, aggravated assault with a deadly weapon and possession of a deadly weapon by a prohibited possessor.

Prosecutor Alicia Robertson told jurors Medina shot the men because he felt "disrespected" by them and thought Grijalva was being disrespectful toward a female friend.

"Essentially ladies and gentlemen, it's three grown men calling each other names," she said.

Medina was hanging out with a friend at her apartment near South Columbus Boulevard and East 29th Street on Nov. 18, 2011, when Grijalva and Colon came over, defense attorney Vincent Frey told jurors in Pima County Superior Court.

The men started talking. Colon said he was in a gang and wanted to know what gangs Medina belonged to. Medina told Colon what gang he was part of when he was younger and lived in California, which seemed to cause some tension, Frey said.

Later the woman, Grijalva and Colon went downstairs. She and Grijalva, who were in an on-again, off-again relationship, appeared to be reconciling, Frey said.

Medina went downstairs to talk to the men while the woman went back upstairs and he began to feel apprehensive and thought the men saw the gun in his pocket, Frey said. Medina asked the men if they knew anybody who wanted to buy a gun and showed his to Grijalva when he was asked if he was carrying one.

It was "his way to let them know he was not there to start drama," Frey said.

Frey told jurors the men then asked Medina, a felon, what units he was in in prison and when Medina answered, Grijalva told Colon the unit Medina was in was "where they house the S.O.'s" - prison slang for sex offenders.

Medina, who was assaulted several times while serving time in California for evading a police officer and in Arizona for check fraud, is not a sex offender and took the comment to be a threat of physical harm, Frey said.

"He knows when they start talking 'you're an S.O.' what they've got in mind," Frey said.

Grijalva charged at Medina who pulled out his gun and fired at him. When Medina saw Colon run to an SUV parked nearby and reach for something, he fired at him too, thinking the man was reaching for a gun, Frey said.

Medina shot the men to prevent them from beating him up and getting a gun and using it on him, Frey said.

"Joe was pulling out that gun to save his own life," Frey said.

Judge Howard Hantman is presiding over the trial.

Contact reporter Veronica Cruz at vcruz@azstarnet.com or at 573-4224.