LOUISVILLE, Ky. (WDRB) -- Former Bullitt County Sheriff Dave Greenwell admitted to the FBI that he informed the target of a federal drug investigation his phone conversations were being recorded, according to an interview played at Greenwell’s trial Wednesday.

In the 90-minute interview, Greenwell said he told Chris Mattingly, a special deputy for the department at the time, about wiretaps – and showed him a transcript of conversations – in an effort to gain Mattingly’s trust and gather more information for the investigation. He is also accused of telling Mattingly about potential witnesses against him.

"I needed him to trust me," Greenwell told the FBI.  

In addition, Greenwell said he felt his life was in danger, telling the FBI at one point that the Mattingly family put out a contract to have him killed.

Greenwell, who resigned from the sheriff’s department last year amid allegations of misconduct, is on trial facing charges of obstructing an investigation and aiding Mattingly in a conspiracy to distribute more than a ton of marijuana tied to a Mexican drug cartel.

Greenwell faces a minimum of 10 years and a maximum sentence of life in prison if he's convicted.

Mattingly, who lived next door to Greenwell, pleaded guilty in 2016 to being part of a drug cell in Kentucky that had ties to Mexico and distributed drugs and large sums of cash across the country.

As part of a deal with prosecutors to testify against Greenwell, Mattingly was given a three-year sentence and fined $10,000. He is already out of prison.

Mattingly testified on Tuesday that although he knew he was under federal investigation, he continued to distribute drugs because he believed Greenwell was protecting him. He said Greenwell also told him about a camera on a pole that was watching him at his car business. But Greenwell says Mattingly knew about the camera before and even watched the people install it.

"I was more careful," Mattingly testified of his actions after Greenwell's help. "I just tried to change the way of doing things."

Greenwell, however, told the FBI he was simply trying to gather more incriminating information to aid a joint investigation his department had with federal authorities, even going as far as concocting a scheme to trick Mattingly’s father, Leonard, also a special deputy at the time. 

Greenwell told the FBI he took Leonard Mattingly to his basement and, after telling him the home was bugged, exchanged notes and burned them in a fireplace. While they didn't discuss the investigation, Greenwell said he wanted to ensure Leonard Mattingly trusted him. Greenwell says they wrote about, "silly things."  

Defense attorneys pointed out that Mattingly was repeatedly pulled over by law enforcement, had hundreds of thousands of dollars seized from him and was eventually federally indicted, indicating Greenwell was not helping him.

At one point later during the FBI interview, Greenwell said he was told by his office that the Mattingly family had put out a contract on his life and "was going to kill me."

When Leonard Mattingly showed up at his home one day, Greenwell said he pointed a gun at Leonard and had him get on his knees and told him to put his hands behind his head. Greenwell says he never let Leonard say a word, during the encounter.

"I almost shot him," Greenwell said. 

Greenwell says on the interview, “I told him, you rotten SOB, I can’t believe you would take a contract (out on) me.” Greenwell says his wife then called 911 and deputies started arriving and Leonard was escorted off the property. 

Also on Wednesday, Capt. Mike Murdoch testified that after the FBI came to the department to interview Greenwell in 2016, the sheriff acknowledged to him, that he told Mattingly about the wiretap.

But Murdoch also testified that Greenwell said he did this to gain his trust and get more information from him.

Rob Eggert, an attorney for Greenwell, pointed out that Mattingly lived next to the former sheriff and already knew he was under investigation, creating a dangerous situation.

Since other deputies had threatened to arrest Mattingly and he lived within walking distance of Greenwell and his family, Greenwell was wise to “play good cop” and get information while at the same time keeping his family safe, Eggert said.

Prosecutors rested their case on Wednesday. Closing arguments are expected Thursday.

Copyright 2018 WDRB Media. All rights reserved.