For about eight hours, Raghunandan Yandamuri stuck to his story: During the time a 10-month-old girl was kidnapped from her apartment and the baby's grandmother was stabbed to death, he was home having lunch with his wife, elsewhere in the apartment complex.

But shortly before 11 p.m. on that Thursday in October 2012, the detective questioning Yandamuri learned from another officer that Yandamuri's wife had contradicted her husband's alibi.

She specifically remembered her husband's breaking his normal lunchtime routine earlier that week, Montgomery County Detective Paul Bradbury testified Tuesday.

"She had to ask the defendant's permission to eat her lunch because he was not there," Bradbury said.

At first, Yandamuri said his wife was wrong. But a few hours later, Yandamuri told Bradbury where the missing baby's body was.

Bradbury took the witness stand for most of Tuesday to testify against Yandamuri, on trial in Norristown in the stabbing death of Satayrathi Venna, 61, and the suffocation of her granddaughter, Saanvi Venna.

Montgomery County prosecutors are seeking the death penalty against Yandamuri, 28, a former information technology worker from India. Prosecutors contend the killings stemmed from Yandamuri's botched plan to kidnap the baby for ransom to feed his gambling habit, and that he preyed on the Venna family after being befriended.

Yandamuri is representing himself with help from a court-appointed attorney.

A ransom note left at the murder scene addressed the baby's parents by nicknames that only a friend would know, Bradbury testified Tuesday, and Yandamuri became one of several people police wanted to question.

Officers found Yandamuri at the Valley Forge Casino Resort on Oct. 25, playing blackjack. In surveillance footage, Yandamuri appeared calm as he walked with police to their car.

When First Assistant District Attorney Kevin Steele asked about Yandamuri's reaction to the request that he talk to police about the case, Bradbury said, "He was very cooperative."

Much of Tuesday centered on Yandamuri's confession, which Yandamuri has since disavowed.

Some time after Bradbury confronted Yandamuri about his wife's conflicting account of his alibi, Yandamuri signed a form to have his confession videotaped. In the video shown to jurors, Yandamuri used gestures to demonstrate how he stabbed the grandmother and said he cut her accidentally when she defended the baby.

Prosecutors have said Satayrathi Venna's neck wound was so deep it almost decapitated her.

Yandamuri said he stuffed a rag in the baby's mouth, tied a towel around her head and smuggled her out of the apartment in a suitcase, but had not meant to kill her. He later left the child in an unused bathroom in the apartment complex.

"I'm really sorry for what happened," he said in the video, but he showed little emotion. "I know this is not a small mistake and that no one will forgive me."

Weeks after his arrest, Yandamuri sent a 24-page letter to Bradbury, alleging that his confession was false. He claimed the crimes were committed by two men who persuaded Yandamuri to help them carry out the kidnapping plot. Yandamuri, who described himself as a victim in the letter, said he was afraid the men would kill his wife if he did not comply.

"Please help me or please kill me," he wrote.

Testimony is expected to continue Wednesday with Yandamuri getting the chance to cross-examine Bradbury.