BRIDGEPORT, Pa. — A young man mired in gambling debts told police he killed a 10-month-old girl and her grandmother during a botched kidnapping after losing at least $15,000 at a casino near his office.

Raghunandan Yandamuri, 26, knew the family from his apartment complex. Like him, the baby’s parents were young technology professionals from India. He had gone to the wife’s birthday party, met the visiting grandmother and — tellingly — used family nicknames in a ransom note demanding $50,000.

“They both are working, so I thought maybe they have some money,” Yandamuri told police in a videotaped statement played at his preliminary hearing Wednesday, during which a suburban Philadelphia judge ordered him to stand trial on murder, kidnapping and other charges.

“My intention was not to kill anyone or not to harm anyone,” he said. “I only tried to kidnap the baby.”

Yandamuri told investigators he panicked after the grandmother, who had opened the apartment door to him on Oct. 22, was killed in a struggle over a kitchen knife he had brought.

He accidentally dropped the baby, put a handkerchief over her mouth to quiet her and tied a towel around her head, he told police. He then left the infant — with her dark hair, huge dark eyes and white dress — in a trash-strewn, unused sauna in a basement fitness center, he said.

He said he returned hours later with milk for her, but found her “unconscious.”

Yandamuri was arrested days later as police, given the nicknames in the ransom note, zeroed in on people who knew the couple.

Venkata Venna, and his wife, Chenchu Latha Punuruss, did not know of anyone with a grudge against them. They are both software engineers who came to the U.S. in 2007.

They had left for work about 8 a.m. that Monday, leaving their only child with Venna’s mother, 61-year-old Satyavathi Venna, who was visiting from India. Venna raced home at 12:30 p.m. when his mother didn’t answer the phone. He found her in a pool of blood, and discovered his daughter was missing.

Yandamuri worked in information technology for GSI Commerce Inc., a unit of eBay Inc. that builds e-commerce sites for other businesses. Its office in King of Prussia, Pa., is less than a mile from the Valley Forge Casino Resort.

When asked by police if he had a gambling problem, he replied “a bit.”

“Last week I lost $15,000 to $20,000, but last month I won $20,000,” he said on the videotape.

He said he had cleared most of his debts through a March bankruptcy filing in California.

Those records show that Yandamuri had amassed $26,000 in credit card debts since 2008, most of it on six accounts he opened in 2011. He was making $6,500 a month at the time, and netting $4,500 after taxes and deductions, he said. He reported sending $600 a month to his parents in India.

Yandamuri moved to the Philadelphia area from San Jose in May, about the same time his wife was expected to come to the U.S., the bankruptcy filings show. She has since returned to India, defense lawyer Stephen Heckman said Wednesday.

Yandamuri told police that he drafted the ransom note on his computer at work and left 10 copies at the apartment. After the slayings, he showered and returned to work, he said. Later that week, he made and distributed fliers to help in the search for the missing baby.

The victims’ relatives moaned as they watched him re-enact the crime with a detective during the taped interview. Venkata Venna was among them, but his wife chose to wait in a nearby room.

Heckman tried to have the first-degree murder charges dismissed, arguing that his client lacked the intent to kill required for a conviction. However, a district judge said there was enough evidence to send the first-degree murder, felony murder and the other counts to trial.

Heckman hopes to help his client avoid the death penalty, which is under consideration by prosecutors.

“I’ll have to talk to my client and see what he wants to do,” Heckman said. “He was very sorry for what happened.”

Kevin Steele, first assistant district attorney of Montgomery County, called the murders “vicious.”

Join thousands of azcentral.com fans on Facebook and get the day's most popular and talked-about Valley news, sports, entertainment and more - right in your newsfeed. You'll see what others are saying about the hot topics of the day.