The suspect attempted to vandalise a transformer before he was electrocuted in Nyandarua County. [DCI, Facebook]

A middle-aged man from Njabini in South Kinangop, Nyandarua County was electrocuted while allegedly stealing a live transformer components.

According to the Directorate of Criminal Investigations (DCI), the suspect was thrown 20 metres away by the high voltage equipment on Thursday.

"School-going children, walking at Kwa White area, found his body on the road. One of his shoes was found on the opposite side of the road," the DCI said on Twitter.

Witnesses said they saw sparks emanating from the transformer at night.

Police suspect the deceased was with accomplices who escaped after he was electrocuted.

The man's body was taken to Engineer Hospital mortuary.