The Aaron Hernandez jail fight has triggered an internal investigation at Bristol County Jail ... with officials gunning to find out how deputies would allow two guys with known beef to come face to face, TMZ Sports has learned.
We broke the story ... Hernandez -- who's supposed to be a segregated prisoner for his own protection -- attacked another inmate in a jail hallway Tuesday and beat the guy up pretty badly.
Our sources tell us ... it was no secret Aaron and the other guy had been mouthing off at each other for some time ... and now officials want to know how in the hell they both ended up in the same hallway at the same time.
Now, Bristol County Sheriff Thomas Hodgson says officials are talking to witnesses and checking jail cameras to find out exactly what went down.
Stay tuned ...