The man was taken to a major trauma centre by ambulance in a critical condition after emergency services were called around 3pm.
An air ambulance was also sent to the scene.
The man’s condition was not life-threatening.
It is understood that the incident involved two prisoners.