LOVELAND – A Loveland Police detective is under investigation, accused of lying in a murder case, while another man says the detective caused him to go to jail for something he didn't do.

The Weld County District Attorney's Office has been appointed by the Larimer County Chief Judge to investigate whether any criminal acts were committed by Detective Brian Koopman during the investigation and prosecution of a murder case against Leroy Wallace. Wallace took a plea deal and was sentenced to 30 years in prison in 2015.

Court documents filed by the Colorado State Public Defender allege Koopman committed perjury, or lied on the stand under oath during criminal proceedings, in Wallace's case.

The Public Defender's Office declined to comment about the perjury accusations.

On a separate matter, another Loveland man is suing Koopman, accusing him in that lawsuit of lying to put him in jail.

Jeremy Myers became the headline in his local paper in 2007 after the Larimer County Drug Task Force and a SWAT team burst through the doors of his tiny apartment in an old sugar-factory complex, accusing him of cooking meth.

Myers' father owned a small, red-brick building on a larger property, some of it belonging to an old sugar factory. Myers had an apartment on the second floor of his dad's building. According to court records, a confidential informant told Detective Koopman that Myers was cooking meth in the attic of his apartment.

It wasn't what most people would call a "traditional" living arrangement, but Myers said it worked for him. It was a cheap place to live while he started his own business.

"This is where I owned my machinery," Myers said. "Lived inexpensively obviously. It's not the Hilton."

Myers had a backhoe, a dump-truck trailer and some small equipment. He worked with his dad.

"You get to work outside. I was owner-operator, living your life the way you want," he said.

Myers didn't have a perfect start in life. In 2002, five years before the raid and meth-cooking allegations, he had weapons and drug charges. He successfully completed a year deferred sentence for possession of a controlled substance including marijuana and mushrooms. Myers also pleaded guilty to a weapons charge, a misdemeanor.

"I did admit that I'm human, and I've made mistakes," Myers said. "I hope to have learned from those and be able to say I am now an upstanding [citizen]."

In September 2007, the Larimer County Drug Task Force and a SWAT team raided the building belonging to Myers' dad, as well as the building belonging to the sugar factory. In the court documents, the building is referred to as "the white building."

During their search of the white building, investigators found several items of evidence. Including a jar they labeled "a lot of dope" in the article in the local paper.

The white building where the jar of "dope" was found didn't belong to Myers or his father. According to later sworn testimony, Detective Koopman admitted that he didn't know that at the time he wrote the search warrant. In a sworn deposition, Koopman said he didn't find out the white building belonged to a sugar company until Myers' civil suit was filed.

Myers said he's never even been inside that building.

According to court records, investigators found nothing in the attic of Myers' apartment.

But at the time, police had a warrant out for Myers' arrest, so he turned himself in and went to jail for three days.

"I was scared that I wouldn't have my freedom anymore," he said.

It took two months before prosecutors dropped the charges against Myers after CBI lab tests revealed the evidence submitted from the raid on this alleged meth lab was not identified as a controlled substance.

"I suffered two months of hell," Myers said.

Later tests requested by Detective Koopman, done by Colorado State University in Pueblo, determined the jar hailed by police as "lot of dope" turned out to be sucrose (or sugar) left over from the old sugar-factory days.

Despite the charges being eventually dropped, going through the court system is expensive. Myers lost his business and has lingering questions about how Loveland Police got this case so wrong.

"I loved my job. I loved what I did. Now, I don't have it anymore," Myers said. "I worked with my dad, couldn't beat working with my dad. I had a great life."

According to court records, the investigation started with Detective Koopman and a search warrant he convinced a judge to sign off on so he could conduct the raid.

Koopman wrote the warrant based on information he says he got from a confidential informant.

It described Myers as a drug producer who cooked 12 ounces of meth per cook, which is a substantial amount of meth, according to 9NEWS sources in drug enforcement.

Koopman installed surveillance cameras and watched the property for several months before the raid. In court records, he said he saw a lot of traffic coming in and out of the property.

"The activity level was very much consistent with what I had observed in previous meth-lab investigations," Detective Koopman said in a later sworn affidavit as part of a civil suit Myers brought forth. "Meth cooks will not normally have many visitors, and my observations at 1101 N. Madison were consistent with the experience I had with investigating meth labs."

As much traffic as Koopman saw going in or out, he never made an undercover meth buy or a traffic stop.

"One might question why I didn't conduct traffic stops on persons leaving 1101 N. Madison. Through experience, this can be an effective way to gain probable cause on a 'street dealer' but not a meth lab," Detective Koopman said in a sworn affidavit. "I would never want to alert a meth cook by making traffic stops consistently on vehicles leaving their locations. Particularly, this is true for this location. This is why I employ tactics such as observation, trash runs and criminal history checks to corroborate [confidential informant] information."

According to the search warrant, Koopman said he tested several items he found in the trash on the property where Myers lived. One field-tested "presumptive positive" for ephedrine, one of the main ingredients in meth.

And he painted a picture of Myers as a man who, according to the confidential informant, kept dogs trained to attack anyone in a uniform along with an armed man on the roof to keep watch.

"My goodness, to kill another person?! How is it going to help my meth manufacturing to kill a cop or anybody?" asked Myers. "It's a story, ma'am. It's a bold, outrageous story."

According to police and court records, none of those statements the confidential informant said were true.

In the sworn testimony related to the civil case, Koopman said he only saw one dog but never saw an armed man.

The substance on the one item from the trash Detective Koopman said in the search warrant had tested "presumptive positive" for ephedrine, could not be identified by the lab.

"Our warrant system is entirely dependent on the honesty of the officer," 9NEWS Legal Analyst Scott Robinson said. "If the officer wants to exaggerate or tell an outright lie, it's not too hard to get an arrest or a search warrant. And then the difficult thing is, if an innocent person is arrested and charged and jailed, there is very little practical remedy for that. An individual could lose their business, lose their livelihood. The law protects officers from any kind of liability, unless they act wholly without probable cause and maliciously. And that's awful difficult to prove."

In 2009, Myers filed a suit claiming the case against him was bogus. In his complaint, Myers "asserted that Detective Brian Koopman obtained an arrest warrant by fabricating facts to create the illusion of probable cause." It was dismissed by the trial judge. But in 2014, the appellate court said Myers' malicious prosecution claim should not have been dismissed and sent the claim back to the trial court.

In 2014, Koopman asked the court to dismiss the case. The court hasn't ruled yet.

And even though Myers has been fighting this battle for six years, he says he won't stop.

"I'm standing up for what's right," he said. "It would've been hard to just let this go. It was just too wrong."

9NEWS asked the Loveland Police Chief, as well as Detective Koopman, for an interview.

Citing pending litigation, the chief declined to comment.

Koopman is still investigating cases for the Loveland Police Department.