By a 10-2 vote, a jury Thursday night convicted New Orleans Police Department Officer Michael Thomassie of raping his girlfriend’s 7-year-old daughter in 2003.

The intense, three-day trial had included testimony from the girl and the revelation that he had sent inflammatory text messages about the case to a fellow officer.

Thomassie, 41, faces a mandatory life sentence for aggravated rape. He has been on paid desk duty.

Meanwhile, the NOPD is looking into text messages from his friend, Sgt. Bruce Glaudi, about what the officer called the “dumb females” the defendant faced in court.

The conviction came hours after Thomassie’s 12-year-old son took the witness stand, clad in black sneakers and a blue zip-up hoodie, to defend his father.

The boy said his mother — the officer’s onetime girlfriend, who testified on Wednesday that she walked in on the officer raping her daughter in their dining room — had told him outside of court that she would get custody of him after his father goes to jail, and that she was acting out of anger.

The boy’s testimony spurred a heated response from Assistant District Attorney Laura Rodrigue, who claimed that the boy had been coached, and pointed out that he had to sit through closing arguments where the allegations against his father were discussed at length.

“If they think it’s in the best interest of a child to use a child for the sympathy of the jury, that goes to the mindset for what you’re being presented,” Rodrigue told the jury. “I think we’ve seen children suffer enough in this case at the hands of this defendant.”

Thomassie was accused of forcing his girlfriend’s daughter to perform oral sex on him in his Algiers home. Putting on a defense that went on for several hours Thursday afternoon, lawyer Pat Fanning attempted to highlight inconsistencies in the girl’s testimony and to suggest that her mother had fabricated or hallucinated the story of the rape.

“There is so much reasonable doubt in this case. It’s just every witness came up, and there was more reasonable doubt,” Fanning said.

Prosecutor Rodrigue pushed back forcefully in her closing argument against any suggestion that either the girl or her mother was not being truthful.

“Believe me, nobody makes this up. Nobody makes this up and comes through this,” Rodrigue said. “It’s horrible. You’re raped again. She got raped again, while he takes selfies.”

Cross-examining Sgt. Lawrence Jones, a child abuse detective for the NOPD, Fanning repeatedly hit on the fact that in her initial interview in 2013 — the crime was first reported a decade after it occurred — the girl told the detective that Thomassie’s penis never entered her mouth.

Asked whether she had been raped, the girl replied, “No, but he tried.”

But Jones tussled fiercely with the defense attorney. He said victims often lack the exact terminology to discuss what they have been subjected to, and he expressed mystification that Thomassie had chosen to live for years with a woman he now describes as a drug-addled liar.

In his closing argument, Fanning said he believed the girl had been manipulated by her mother into believing a story about being raped. He also lashed back at the prosecution, which closed its case by displaying a picture of the girl posed in a Christmas photo at age 7.

“They blow up a Christmas picture from when she was 7 years old: ‘Look at this beautiful angelical girl that he forced his penis into.’ What did that add to the evidence in the case?” Fanning asked the jury. “That’s not trying to get to the facts of whether or not my client did what they accused him of.”

But in her closing argument, Rodrigue said Thomassie had repeatedly shown he had only his own interests at heart, not those of the girl or of the son whom his defense attorney put on the stand.

The prosecutor pointed to text messages just this week in which Thomassie expressed hope that the purported victim, now 19, would not testify in court. The officer also sent a courtroom selfie to his current girlfriend with a message declaring his preference for unshaved genitalia.

“This is a man charged with raping a prepubescent girl, a 7-year-old girl, and he’s taking selfies, telling his girlfriend he prefers no pubic hair. … That should be very alarming to any person on this jury,” Rodrigue said.