A Baton Rouge judge on Monday approved the use of evidence, including text messages that a prosecutor claims not only highlights a Denham Springs man’s pattern of illegal drug activity but also shows the heroin-related death of his girlfriend was no accident.

Jarret McCasland, 25, is charged with second-degree murder for allegedly injecting 19-year-old Flavia Cardenas with a lethal dose of heroin in July 2013. He has pleaded not guilty.

Three months before her death, McCasland and Cardenas were arrested at a Gonzales home in April 2013 after McCasland allegedly sold methamphetamine to a confidential informant at the home. An Ascension Parish sheriff’s detective testified last year in McCasland’s murder case that Cardenas was in possession of marijuana at the time of the arrest.

A cellphone seized from McCasland during that arrest contains photographs of illegal drug activity, East Baton Rouge Parish prosecutors have said.

Another cellphone seized from McCasland in August 2013 when he was arrested in Cardenas’ death indicates he communicated with others about the acquisition and distribution of drugs, including heroin, from December 2012 until August 2013, prosecutors have stated in court documents.

Two weeks after her July 26, 2013, death, McCasland sent text messages bragging about the potency of the heroin he was trying to sell and appeared to joke about her death, an East Baton Rouge sheriff’s detective testified in October. McCasland’s attorney maintains the comments were taken out of context.

State District Judge Don Johnson on Monday gave prosecutors permission to use McCasland’s April 2013 arrest at his murder trial, as well as the fruits of the search conducted at the Mire Road home where the arrest took place.

McCasland’s cellphone text messages also can be used at his trial, prosecutor Will Morris said after Monday’s ruling.

“We feel like it’s important evidence. We’re glad the judge saw it that way,” Morris said outside Johnson’s courtroom.

“Naturally we’re disappointed in the ruling,” said McCasland’s attorney, Rodney Messina.

Messina still is seeking to have Johnson suppress some of the cellphone evidence. The judge will hear that request Feb. 5.

In a December court filing, prosecutors claim the evidence they have gathered against McCasland in Cardenas’ death demonstrates “a distinct pattern of intentionally distributing controlled dangerous substances in socialized settings to the victim by supplying the drugs and enabling the recipients to consume the drugs in his presence.”

“The State contends that the evidence presented is relevant to the extent that mistake or accident cannot be used to excuse, justify, or mitigate the charged offense,” the prosecutors wrote.

In 1987, amid the American crack cocaine epidemic, lawmakers expanded Louisiana’s second-degree murder statute to include offenders who distribute an illegal drug that is proven to be the direct cause of a user’s death, even when that person lacked specific intent to kill.

Messina has noted that cocaine and other substances besides heroin were found in Cardenas’ body after her death.