STOCKTON — Two men pleaded guilty Tuesday to murdering and robbing 58-year-old Cynthia Ramos, of Tracy, and were sentenced to life in state prison without the possibility of parole.

In a move that surprised the prosecutor and members of Ramos’ family, domestic partners Jorge Morgan, 24, and Robert Anthony Morgan, 39, changed their pleas to guilty Tuesday morning. San Joaquin County Superior Court Judge Bernard Garber accepted the pleas and handed out life sentences just hours later.

Ramos was stabbed more than four dozen times, bludgeoned and strangled Aug. 6 in her home in Green Oaks Mobile Home Estates.

A witness said she saw the men, who were Ramos’ neighbors, leave Ramos’ home with a suitcase in which she was known to keep her jewelry. A Tracy police detective said during the preliminary hearing that he found a bloody knife and women’s jewelry at the Morgans’ home.

The San Joaquin County district attorney took the death penalty off the table late last month. Had the case gone to trial, the longest sentence the couple could have faced was life in prison without the possibility of parole, said prosecutor Valli Israels.

Israels said she was ready to take the case to trial and was surprised by the defendants’ change in plea.

“I guess they wanted to resolve this case,” she said.

Ramos’ children, who had only a few hours to collect their thoughts, spoke tearfully to the court Tuesday afternoon about how their mother’s death affected them, and about their disgust for the defendants.

Daniel Martinez, one of Ramos’ six children, called the men cowards and said neither deserves to ever walk the streets again.

“You sentenced us on August the sixth to our hell,” Martinez said. “Rest assured your hell is coming.”

Christina Barnes, Ramos’ daughter, told the court that her mother was a loving and caring person who fed the homeless, even though she didn’t have much herself. She had a hearty laugh and a sense of humor.

She said her mother was taken away by “two demons disguised as humans” who didn’t care about her screams and cries.

Israels told the judge that while the family was angry, they also appreciated that the men had taken responsibility for their actions. The family did have one request, Israels said: to hear from the defendants themselves.

But neither spoke.

Outside the courtroom, Ramos’ family members hugged and consoled each other as they processed the day’s events.

“Everybody has a sense of relief,” Martinez said. “As for the pain, it goes so deep on so many levels.”

The family is starting a foundation to help the children of murdered parents, Barnes said, adding that she hopes it will bring some good from the tragedy.

McClatchy News Service contributed to this report Contact Sophia Kazmi at 925-847-2122. Follow her at Twitter.com/sophiakazmi.