(CNN) A police officer has admitted buying pornography at the home of a grieving family following the death of their child as he waited for the undertaker to arrive.

PC Avi Maharaj, 44, a police officer serving with London's Metropolitan Police Service, was on duty at a property in south London when he used the homeowner's cable TV account to purchase access to pornographic channels, spending £25.96 (around $32.50), the Independent Office for Police Conduct (IOPC) said in a statement.

The officer was investigated after the homeowner filed a complaint, and the matter was referred to the IOPC. He pleaded guilty to fraud at Westminster Magistrates Court on Tuesday.

The investigation found that the officer was the only person present at the property when the purchases were made, and also found evidence that suggested the officer falsified his attendance log to cover his actions.

"PC Maharaj's behaviour was shocking and even more so given he was guarding the property in the absence of the homeowner," Sal Naseem, the IPOC's regional director, said in the statement. "Not only were his actions deceitful but he caused considerable distress for the family involved who were dealing with the sudden death of a family member.

"Our investigation showed that PC Maharaj was the only person in the property who could have downloaded access to pornographic channels at the time the account was accessed. Today he has admitted his guilt under the weight of compelling evidence. I am sorry that the family involved had to deal with this while also coping with the tragic loss of their child," he added.

Maharaj will be sentenced for fraud in August, and will also have to answer a case for gross misconduct, the IOPC said.