A jury convicted a Kansas man of capital murder on Thursday in the shooting deaths of his estranged wife, their two teenage daughters and his wife's grandmother -- crimes his attorneys said he committed after his spouse took a lesbian lover and filed for divorce.

Attorneys for James Kraig Kahler had argued that his mental health deteriorated and he finally snapped because of his pending divorce and his wife's sexual relationship with another woman whom she met when they lived in Texas. But prosecutors painted a picture of man who coldly picked off his victims, one by one, at the home of his wife's grandmother, near Burlingame, a small town 20 miles south of Topeka, during the weekend after Thanksgiving 2009.

The Osage County jury needed only about two hours to reach a verdict. Kahler, dressed in a dark suit, stood calmly and showed no outward emotion as the bailiff announced the verdict. His parents, seated in the front row, also appeared calm.

Jurors will next hear additional evidence and consider whether to recommend a death sentence, weighing issues such as the cruelty involved in the shootings against Kahler's previous lack of a criminal record and his mental state at the time of the crimes.

Kahler, who goes by his middle name, Kraig, was convicted of four counts of first-degree murder as well as a single count of capital murder -- a charge that prosecutors could bring because Kansas law says multiple murders can qualify a defendant for the death penalty if they're part of "the same transaction" or "a common scheme." Kahler also was convicted of one count of aggravated burglary, with prosecutors contending he entered the grandmother's home without permission.

Kahler, 48, had directed city utility departments in Weatherford, Texas, and Columbia, Mo., but moved back to Kansas just weeks before the shootings to live with his parents. Witnesses testified that he lost the Missouri job after he became obsessed with keeping his marriage alive and that he believed his daughters had sided with his wife.

The victims were his wife, 44-year-old Karen Kahler; her grandmother, Dorothy Wight, 89; and the Kahlers' daughters, Emily, 18, and Lauren, 16.

Law enforcement officers and emergency medical personnel said that before dying, Wight and Lauren Kahler identified Kraig Kahler as the gunman. The Kahlers' son Sean, now 12, also testified that he saw his father shoot his mother before he escaped the scene without physical injury.

In closing arguments earlier Thursday, Assistant Attorney General Amy Hanley said Kahler was angry and gunned down his family members because he believed he could fix his problems by getting rid of those he felt were responsible.

"The defendant had a plan," Hanley told jurors. "In his mind he had a problem to eliminate, and he knew how to do it."

Defense attorney Thomas Haney said Kahler was mentally "broken" because of his wife's lesbian affair and her pursuit of a divorce.

"What happens when someone who's rigid is put under too much pressure?" Haney said, breaking a pencil in front of jurors. "They snap."

Kahler was a city utilities director in Weatherford, Texas, and Columbia, Mo., but moved back to Kansas shortly before the shootings to live with his parents outside Topeka.

According to trial testimony, his wife began having a sexual relationship with the other woman in Texas in 2008, before Kahler took the job in Missouri. His wife filed for divorce in January 2009, and witnesses said Kahler became so obsessed with his failing marriage that his work suffered and he lost his job.

Partners in a Kansas City, Mo., psychiatric office testified on opposite sides of the case about Kahler's mental health. One said Kahler was so severely depressed that he wasn't thinking rationally and couldn't control his behavior at the time of the killings. The other said Kahler's depression wasn't serious enough to prevent him from forming the intent to kill or making conscious decisions about what he did.

Kansas law says a mentally ill defendant still is legally responsible for a crime, unless his illness or mental defect prevented him forming an intent to commit the crime and, in the case of capital or first-degree murder, acting with premeditation.