The police have sent the bodies for post mortem and are investigating the case. (Representational)

A police constable in Uttar Pradesh allegedly committed suicide after killing his wife and elder son, the police said.

The incident took place in Uttar Pradesh's Prayagraj. The police said that the bodies of the cop, his wife and child were found by his elder son.

"Govind Narayan's younger son came home to find the main gate of their home locked from inside. He broke it with the help of his neighbours and found the bodies," SSP Satyarth Anirudh Pankaj told reporters.

"Govind Narayan's body was hanging from the fan. His elder son is saying that his father killed his mother and brother," he said.

The police have sent the bodies for post mortem and are investigating the case.