In his own words, Cook County Attorney Tim Scannell wasn’t pulling any punches as he sat on the witness stand at his sexual misconduct trial Wednesday in Duluth.

Scannell alternated between laughing and crying, swearing and sarcasm, as he described in great detail his family life, his work as a prosecutor, the day he was shot in the line of duty and his relationship with a 17-year-old girl in the summer of 2012. At times he rambled, prompting successful objections from the prosecution.

The casually dressed Scannell waived his right to remain silent, choosing to testify in front of the jury that will soon decide whether he is guilty of two felony counts of fourth-degree criminal sexual conduct.

The prosecution rested its case Wednesday afternoon, after which the defense called Scannell. With his testimony expected to conclude this morning, the case is likely to go to the jury today.

Scannell, 48, admitted that he made a mistake by getting involved with the girl in the first place. However, he contradicted much of the girl’s version of the events, saying that their physical relationship was limited to kissing on “less than 10” occasions.

The girl testified Tuesday and Wednesday, telling jurors that she and Scannell regularly met each other that summer. She said they kissed numerous times while parked on a rural road, and that he touched her on her breasts, abdomen, legs and buttocks. She said she resisted his urges to engage in sexual intercourse. Defense attorney Joe Tamburino asked Scannell if he thought he was doing anything illegal.

“I didn’t think I was doing anything illegal, because I wasn’t doing anything illegal,” he asserted.

Scannell sobbed uncontrollably as he described the series of events that led to the relationship, starting with his shooting at the Cook County Courthouse in December 2011. Scannell was shot four times after prosecuting Daniel Schlienz for sex crimes involving a minor.

Scannell said he was diagnosed with post-traumatic stress disorder after the shooting. He rarely worked during his long recovery process.

He said he became suicidal and, at one point, spent three days in a psychiatric unit.

Scannell testified that the prosecution’s portrayal of him as a coach, mentor and advisor to the alleged victim were greatly exaggerated. He said he had little involvement in her life after the December shooting. It was not until his own son began applying for colleges that he offered to help her along.

It was during a college planning meeting with her at her school that Scannell said he first noticed an attraction.

“She was just sitting there, and I thought, ‘Holy s--. I’m in trouble. I’m attracted to (her),’ ” he testified. “I didn’t know what to say. I didn’t know what to do.”

Scannell said he bit his tongue for as long as he could before confessing his attraction. Their relationship grew, and eventually they held hands and went walking on a trail together.

On a few occasions, Scannell testified, they drove around together, parking on a rural road and kissing. He said touching was limited to her arms, but acknowledged he once inadvertently touched her breasts.

“I was like, ‘Whoa! That can’t happen,’ ” Scannell said, throwing his arms in the air to indicate his response.

Scannell said their relationship never went beyond that. After his sister reported the relationship to a school counselor, Scannell admitted it to the girl’s mother, saying he “thoroughly and utterly betrayed her trust.”

Scannell confirmed previous testimony that he promised to stop contacting the girl. However, he said she would not stop contacting him, and he was afraid how she would take it if he abruptly stopped talking to her.

The girl’s parents filed for a harassment restraining order against Scannell in December 2012, prompting the criminal investigation.

Scannell testified that he confessed the relationship to his wife. She was understanding and willing to work through it, he said.

“I told her, ‘I can’t get my life together. It’s so f--- up, I don’t know what to do about it,’ ” he testified. “She said, ‘Take a deep breath. We’ll get through this.’ ”

Scannell said the only two people he’s ever been in love with are his wife and the girl. He said he’s tried to make things right with the families who were hurt and the friendships that were lost because the relationship.

“I’ve tried to apologize so many times and no one wants to hear it,” he said. “I have no idea how to make amends.”

The prosecution did not have a chance to cross-examine Scannell before testimony ended for the day.

Earlier in the day, special prosecutor Tom Heffelfinger called his final witnesses, including Assistant Cook County Attorney Molly Hicken, who also was involved in the Schlienz shooting incident. She testified about the community support for Scannell after the incident. Hicken was one of the organizers of “Tim’s Team,” a group of a couple of dozen family members and friends who ran the 2012 Garry Bjorklund Half Marathon in support of his recovery efforts.

Hicken testified that Scannell brought up his relationship several times at the office after the allegations first came out in the restraining order. He was “worked up” about it, and it would intrude on other matters, she said.

“He saw this as an attack on him personally by (the girl’s family),” Hicken testified. “He saw himself as the victim in this.”

She said Scannell talked about a “psychic connection” he had with the girl. She said he talked about state statutes regarding minors and said he wanted to have sex with the girl.

In Minnesota, the age of consent in most cases is 16. However, the prosecution alleges that Scannell was in a “position of authority” over the girl at the time of the acts, making them illegal.

The defense contends there was never any intentional sexual touching beyond kissing, and that Scannell was no longer an authority figure in the girl’s life at the time anyway.