YARMOUTH — Lucas Braman saw more than his share of upheaval before his short life ended suddenly this week. But the red-haired, cake-loving 23-month-old had been thriving in the past few months, said the two women who had custody of the boy.

The death of the child, who was found unresponsive in his crib Thursday morning, remains under investigation. The cause of death is unclear, but Cape and Islands District Attorney Michael O’Keefe said Friday the investigation so far does not point to suspicious circumstances. Preliminary autopsy information may be available early next week.

In an interview at their home on Friday, Elizabeth Cavallini and Sheryl Erb said the child’s death was a heartbreaking tragedy that came as they were working hard to make his life richer, happier, and healthier, and to help him overcome a range of emotional and behavioral problems.

At a hearing in Barnstable Juvenile Court on Tuesday, two days before Lucas died, a judge found that the boy and his 3-year-old sister, who had briefly been in foster care, should stay with Cavallini and Erb for the time being, the two women said, despite a request by the children’s mother that custody be returned to her.

A social service agency official had checked on the boy Monday and found that he was doing well, according to O’Keefe.

The children’s mother is Erb’s cousin, and the toddlers had lived with Erb, 24, and Cavallini, 21, since mid-November, when the court awarded them custody. That ruling came despite objections from officials at the Department of Children and Families, who wanted them to be in a different foster care arrangement but have not explained why.

Lucas was born addicted and had emotional and physical problems.

Erb and her partner knew the two youngsters well, they said, seeing them often and helping to care for them since they were babies.

‘This was always their home away from home, and they were happy and comfortable here.’

Elizabeth Cavallini, one of the children’s guardians

“This was always their home away from home, and they were happy and comfortable here,” said Cavallini, who works as a nanny. “We had taken them for weekends and for weeks at a time.”

Lucas, the child of substance abusers, was born addicted to opiates and suffered emotional and physical problems, O’Keefe said.

According to Erb and Cavallini, the state Department of Children and Families had some early contact with the boy, performing checks on his well-being during his infancy, but eventually phased out its involvement and allowed him to stay with his mother.

Attempts to reach the mother, Jennifer Cronin, through her Facebook page and at a phone number posted on the page were unsuccessful Friday.

“Thank you for ALL your prayers,” she wrote online on Friday. “Now please send prayers that I get emergency custody of [my daughter] today.”

The little girl was removed from Erb and Cavallini’s home while the investigation is underway, and the women said they understand but are worried about how she is coping and are eager to resume caring for her.

Last fall, after the children’s parents were evicted from their apartment in Dennis and became homeless, Erb and Cavallini let the family stay with them, they said. But the arrangement proved chaotic, and last October, police were called to the home for a domestic disturbance involving the parents. That incident triggered the state Department of Children and Families to become involved again and to place the children in foster homes briefly, said Erb and Cavallini, who immediately began trying to win custody.

The two women had been working toward having a child of their own, they said, using in vitro fertilization, but put those efforts on hold so they could focus on Lucas and his sister.

“It’s hard to imagine looking in their eyes and saying, ‘You can go to foster care, because we don’t want to disrupt our lives,’ ” said Erb, a marketing manager for a real estate company. “And it was so much fun.”

They said they attended classes, opened their home to inspections, and outfitted the gray-shingled house to suit the children: a sandbox and a wooden swing set with a pirate flag in the fenced backyard; a trampoline and a chalkboard on the side porch; a train table and shelves full of toys in Lucas’s room. They took the children apple picking, swimming, and to a Celtics game, often organizing joint adventures with Cavallini’s sisters and their three young children.

Still, Cavallini said, the goal remained clear: to work toward reuniting the children with their mother.

“As long as she’s clean and sober, we’ve always maintained that’s what’s best for them. That’s their mom,” she said.

On Friday, Lucas’s tiny fire hat and coat, his trains, and his toy vacuum cleaner lay where he had left them in his room. Above his empty crib, the mattress stripped of sheets, floated a pair of fluffy white clouds Cavallini made from fishing wire and cotton batting.

On Wednesday night, she said, Lucas wouldn’t finish his spaghetti, so he didn’t get his treat: a Cadbury chocolate egg. On Thursday morning when Erb went to get him, he was unresponsive in his crib.

“I’ll always regret that, that he didn’t get his candy,” said Cavallini Friday, in tears.