Brazilian prosecutors have opened an investigation into three prisons in Goias state after videos surfaced showing what seem to be prison guards torturing inmates.

The vilest deeds like prison weeds bloom well in prison air. It is only what is good in man that wastes and withers there. Oscar Wilde The Ballad of Reading Gaol, 1898

In videos believed to have been shot between 2014 and 2015, but only obtained this week by prosecutors and now made available to the press, several guards can be seen repeatedly using stun guns on subdued inmates.

In one video, prison agents can be seen filming each other as they shoot a prisoner with a stun gun while he is sleeping.

Violence is rife in Brazil's overcrowded prison system. Earlier this year several prison riots left dozens of inmates dead.