Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A white Alabama police officer was caught on a secret recording discussing ways to kill a black man and cover it up, it was revealed Tuesday.

The 2013 incident was quietly settled out of court and ended with the officer keeping his job, according to legal documents and interviews with lawyers and officials involved in the case.

The recording, first reported by the Guardian and obtained by NBC News, captures Alexander City Officer Troy Middlebrooks during a May 2013 visit to a home where the suspect, Vincent Bias, was visiting relatives.

At one point, the officer pulls Bias' brother-in-law — who is white — aside and tells him he doesn't trust Bias. Middlebrooks had arrested Bias on drug charges weeks earlier, and seemed to be frustrated that he had made bail.

Middlebrooks tells Bias' brother-in-law, that if he were the suspect's relative, he would "f---ing kill that motherf------" and then arrange the crime scene to "make it look like he was trying to f---ing kill me."

At another point, Middlebrooks tells the brother-in-law that Bias "needs a g--d--- bullet."

The audio was posted on Soundcloud by the Guardian (contains vulgar language).

A month after that incident, Bias' lawyers told the city they intended to sue the city of 14,875 people for $600,000. They drafted a lawsuit that accused Alexander City police of harassing him, and included the contention that Middlebrooks also called Bias the N-word.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Bias' legal notice was passed to the city's insurance company, which arranged a settlement of far smaller amount: $35,000, according to Alexander City's attorney, Larkin Radney.

With that agreement, Bias never sued. The unfiled complaint was obtained by both the Guardian and NBC News.

Bias lawyer Eric Hutchins has called for a state and federal investigation.

Middlebrooks, meanwhile, remains on the job. He could not be reached by NBC News for comment.

Alexander City Mayor Charles Shaw and Police Chief Willie Robinson did not respond to calls seeking comment.

Chief Robinson, who is black, told the Guardian that Middlebrooks was disciplined, but he declined the paper's request for details.

Robinson defended Middlebrooks, saying, “He was just talking. He didn’t really mean that.”

The chief also told the paper that he personally disagreed with the city's decision to settle with Bias.

"It’s a whole lot different if you hear both sides," Robinson said.

Middlebrooks exchanged text messages with a Guardian reporter in which he said he had been cleared in a state inquiry. But the state Bureau of Investigation told the paper it had no record of looking into the case.

Bias, 49, told NBC News that he took the money in hopes of moving away from Alexander City, where he claims he was unfairly targeted by police, in part because of his race.

But he said that after the recording surfaced, and he threatened a lawsuit, the police added to the drug charges against him until he felt he had no choice but to plead guilty. "They forced my hand," he said.

Bias said he served 14 months in a county jail, and was released two months ago.

He said he has only discussed the allegations with his lawyers. He said he was never interviewed by internal affairs investigators.