GONZALES — A Geismar man pleaded guilty to second-degree murder Monday in the beating and strangulation of his wife nearly three years ago while she had a restraining order against him, prosecutors in Ascension Parish said.

David L. Johnson Sr., entered the plea the day before jury selection was set to begin in his murder trial. Though his defense attorney had raised questions last year about Johnson's competency to stand trial due to a 2014 stroke, Johnson, 40, agreed to plead guilty to avoid having family members testify.

Tyler Cavalier, spokesman for 23rd Judicial District Attorney Ricky Babin, said Tuesday the plea came without a deal from prosecutors.

Johnson, a former East Baton Rouge Parish sheriff's deputy until 2003 who more recently worked as a physical therapy assistant, was accused of beating his wife, Monica Butler Johnson, with a baseball bat and then strangling her in the backyard of their Parks of Dutchtown home on Aug. 9, 2015, prosecutors said.

After fleeing the scene, David Johnson was captured at a West Baton Rouge Parish convenience store and admitted to Ascension Parish sheriff's investigators he killed his 45-year-old wife after he had watched the home of his estranged family for two hours. He was waiting for people to leave a party being held at the house at 12143 Canterbury Park Drive, Geismar, prosecutors said.

Defense Attorney Rusty Messer said Tuesday he offered a deal to prosecutors in which David Johnson would plead to the reduced charge of manslaughter in exchange for a sentence of 40 years in prison.

Messer said he recommended Johnson not plead guilty to the second-degree murder charge because the mandatory life sentence he will get with the plea was the worst possible outcome had he gone to trial. But Messer said what was important to Johnson was keeping his family out of court.

“He wanted to avoid the strain of his family having to appear and testify," Messer said.

Cavalier, the district attorney's spokesman, said prosecutors were prepared to put Johnson's two children, who were present during the slaying, on the stand at trial. Johnson struck one of them, a stepson who was 18 at the time, with the bat and broke the teen's arm as he tried to defend his mother.

Before his wife's death, David Johnson had been accused of assaulting and stalking her on more than one occasion, according to court records. David Johnson was served with a restraining order just months before the murder.

Johnson had attempted to strangle his wife during a Dec. 31, 2014, argument about a cellphone. But Monica Johnson, a former admissions administrator at Remington College in Baton Rouge, twice asked prosecutors to drop the charges over the strangling incident because of what she had indicated was her husband's "recent medical condition," without saying in court papers what that was.

Prosecutors dropped the strangulation charge, put Johnson in a pretrial diversion program and had him start anger management classes in July 2015, a month before the slaying.

But, in June 2015, David Johnson, then estranged from his family, was allegedly stalking Monica Johnson and their son at a birthday party. She sought and received a restraining order days later.

Prosecutors planned to raise those and other past domestic incidents at trial, court papers show. 

Defense Attorney Messer had raised questions about David Johnson's sanity at the time of the slaying and his competency to stand trial. 

Messer argued in court papers earlier this year that Johnson had a stroke in June 2014 that changed his behavior from a happily married man to a moody and increasingly violent and obsessive person who once threatened to commit suicide.

A physician had recommended David Johnson be evaluated for loss of higher cognitive function due to the stroke, but he was never examined before the slaying, court papers say.

The defense attorney said prosecutors had in their possession a statement from Monica Johnson in which she said her husband's "mental illness" was the cause of their past physical disputes, according to court papers.

Messer said Johnson made 23 phone calls, which he recorded, after his wife's murder. The recordings, which were turned over to Messer in December, had evidence that David Johnson saw his estranged wife in the arms of another man.

Judge Thomas Kliebert Jr., of the 23rd Judicial District, on May 8 rejected Messer's petition for a review of Johnson's mental state. On Monday, Kliebert deferred David Johnson's sentencing to Sept. 11. 

Follow David J. Mitchell on Twitter, @NewsieDave.