A Brooklyn Detention Complex officer was assaulted Tuesday night while on the job, and the whole thing was caught on video.

The guard can be seen in an altercation with the inmate before he starts punching him in the face and kicking him repeatedly.  

This goes on until the guard looks to be uncoscious and the inmate walks away.

Another correction officer at Rikers Island was also attacked Tuesday.

Sources say an inmate got angry after correction officers found contraband on him.

The inmate then punched one officer in the face.

Four other officers who stepped in to help were also seen by hospital staff.

The inmates in both cases have been moved to restrictive housing.