LARGO — John "J.J." Rush was "out of control" on the day he was shot dead.The defense attorney representing Rush's ex-wife, accused in his slaying, told jurors Wednesday that Rush had been driving around drunk and experiencing withdrawal from an Oxycodone prescription on March 7, 2015.Cara Ryan, a longtime teacher, shot him in self defense, attorney Roger Futerman said during the opening statements of her trial for second-degree murder. He painted Rush, a former St. Petersburg police sergeant, as an intimidating, unpredictable addict."She'd never seen him this out of control," Futerman said.After the shooting, Pinellas County Sheriff's Office investigators gave this account: Ryan, 47, sent Rush a sexually explicit text message inviting him to come over. About a half hour later, he was shot. The bullet went through his left arm and into his chest, killing him.There was no dispute Wednesday as to whether Ryan fired the fatal shot. What differed was her intent. Futerman emphasized self-defense. Assistant State Attorney Liz Jack said Ryan was distraught after she was blindsided by Rush's decision to end their 20-year relationship less than a month before.The story starts there, Jack said, when the couple broke up on Feb. 15. Ryan and Rush married in 1997 and divorced in 2006 but had been in an on-and-off relationship since.After the breakup, friends and family said Rush, 45 when he died, was "happier than they've seen him in years," Jack said. Ryan constantly checked his text messages and was controlling of the couple's finances, which Futerman said was because Rush had a gambling addiction.She was so distraught after the relationship ended that she started taking antidepressants and took a week off from her teaching job at Clearwater High School, Jack said. Ryan tried to win Rush back, sending suggestive text messages and trying to make plans to meet up."He kept it polite, pleasant, arm's length," Jack said.Until that night in March, when he went back to the apartment he used to share with Ryan at her invitation, Jack said.While there, he saw a text froma detention deputy she was dating, responding to sexual text messages Ryan had sent him that day. Jack said he got mad and stormed out.Futerman said Rush pinned Ryan down and threatened her: "I'm going to kill you. I'm going to kill him. I'm going to bust you open so no man can want you again."Rush left but returned minutes later. He burst inside, Futerman said. Ryan knew there was an intruder in her home and suspected it was Rush but wasn't certain.Frightened, she closed her eyes and fired the shot from a .38-caliber pistol Rush had bought her years before."She was defending herself," Futerman said.Rush staggered to the home of a neighbor, who called 911. Ryan also called authorities. Jack played the recording of Ryan's call for jurors Wednesday."My ex-husband came in, and he raped me," Ryan can be heard saying to the operator.Detective John Syers, the lead investigator on the case who took the stand Wednesday, told jurors she gave three versions of the rape before she said she thought he was an intruder. Futerman raised questions about the Sheriff's Office's investigation into the shooting.He brought up inconsistencies in the testimony from Scott Vaughan, the responding deputy who kept an eye on Ryan until detectives arrived, and questioned whether he read her Miranda rights.He told jurors Syers had been friends with Rush. Syers said he knew Rush on a professional basis when they worked the same cases, Rush as an investigator with the Pinellas-Pasco Medical Examiner's Office.And he questioned why authorities left Ryan, a reported rape victim at the time, in a cruiser for long enough that she urinated on the floor."This poor lady was in the car almost three hours before she got attention for her rape, is that correct?" Futerman asked Vaughan."Yes, sir," he said.Contact Kathryn Varn at (727) 445-4157 or [email protected] Follow @kathrynvarn.