LAFAYETTE — The two-day trial of a 21-year-old Carencro man accused in the July 2009 shooting death of Mark Boutin ended in a mistrial Thursday after the prosecutor accused the defendant of committing a homosexual act while in jail the following December.

Prosecutor Pat Magee said Judge Jules D. Edwards III granted the mistrial on grounds that the prosecution accused Troydell Simmons of homosexual misconduct in which charges were never filed.

The prosecution’s action affected the jury’s ability to make a fair and impartial decision in Simmons’ second-degree murder trial, Magee said.

Simmons, 21, is accused of shooting Boutin once in the head with a 9 mm handgun during the early morning of July 2, 2009.

Boutin was found next to a vehicle in the 700 block of Fado Street in Carencro. Officers later discovered that Boutin often posed as an undercover officer to steal drugs from dealers, according to testimony. A motive for his killing was never determined.

The defense’s move for a mistrial came shortly before 5 p.m. Thursday while Magee cross examined Simmons, who had taken the stand earlier in his own defense.

Magee had asked Simmons whether he recalled being engaged in homosexual activity on Dec. 15, 2009, with another inmate at the Lafayette Parish Correctional Center, which was alleged in a guard’s incident report.

After the ruling, Magee said he raised the allegations in an attempt to lay a foundation to use previously taken testimony from the guard about statements that Simmons allegedly made. The line of questioning followed earlier questions about whether Simmons had ever referred to himself as a “killa,” which Simmons had denied.

Simmons’ attorney, Harold D. Register, moved for a mistrial immediately after Magee mentioned the guard’s report.

Register declined to comment after the ruling.

Investigators linked Simmons to the crime after he claimed ownership of a gun that was later forensically matched to spent cartridges recovered at the crime scene. The gun was discovered in the backseat of a car in the parking lot of Food World, 330 South Pierce St.

Simmons testified Thursday that he claimed ownership to protect the three men he was with that day, all of whom were drug dealers with lengthy arrest records.

Simmons said he decided to “take the charge” after two of his friends pleaded with him to do so, both of whom promised to bail him out of jail.

“I didn’t want all of us to go to jail, so I took the charge,” Simmons said, adding that he has been in jail ever since.

Simmons, who was 19 at the time, said he did not know the gun had been involved in a homicide. On the way to jail that day, Simmons said he told the officer that the gun was not his, but instead belonged to a man he identified as Brian Jones. Simmons said Jones was a drug dealer and told him the gun was for protection.

No fingerprints were ever discovered on the gun and DNA evidence could not definitively link Simmons to the gun, according to testimony given.

On the night of the shooting, Simmons said he was out jogging to condition himself to be a boxer. He ran into a friend who accompanied him during a portion of the trip. Simmons said a Carencro police officer stopped both of them, searched them and asked whether they had heard gunshots. Both said they had not and were then let go, Simmons said.

Magee requested a new court date in January 2012.

Register requested that Simmons be tried by a judge when the case comes back before a court. Register also urged a previous motion for a speedy trial.