A man has been arrested for murdering his wife and 6-year-old daughter by feeding them poison-laced ice cream and strangling them to death, police said.

Investigators found that Tejas Patel from the city of Vadodara, in the Indian state of Gujarat, meticulously preplanned the murders after browsing online the different ways to murder someone. Patel admitted the crime during interrogation and was arrested Wednesday, police said, The Times of India reported.

Tejas said he "surprised" his wife Shobhana Patel and their 6-year-old daughter with an ice cream treat on the night of Oct. 10. The victims ate the poison-laced ice creams and went to bed. In the middle of the night, when they started to cough and gasp for breath, the suspect went into the bedroom and strangled them both to death, police said. He then reportedly stayed with the bodies for almost an hour to make sure they really were dead.

Tejas then called his brother-in-law who was staying on the lower floor of the apartment, asking for "help," claiming that the victims were found unconscious. Shobhana and her daughter were rushed to the hospital but were pronounced dead on arrival.

The police initially took Tejas into custody on suspicion and started interrogating him. An autopsy confirmed that deaths were caused by strangulation and there were injuries around the neck. The medical report also indicated that there was poison in their systems.

During a search at the residence, the police found the poison which was allegedly used for the murders. The cops also found evidence of internet searches on topics like "how to kill using poison," and "how to kill using a pillow" from Tejas' phone.

"The data from his phone also showed that he had searched the internet for topics related to rat poison and its effects on humans. We recovered a used packet from the loft of their residence,” Lakdhirsinh Zala, a senior investigating officer said, The Indian Express reported.

A preliminary investigation revealed that Tejas murdered his wife because he was having an extramarital affair and wanted to live with that woman. The accused said he did not want to murder his daughter but was unsure if he would be able to raise her without a mother.

“We are yet to investigate if the woman was aware of the crime but in his confession, Tejas described it as a one-sided affair,” Zala told the publication.

Crime scene police line | Representational Image
Crime scene police line | Representational Image GETTY IMAGES / SCOTT OLSON