At HMP Perth, there were ex-gratia payment claims for 10,779 hours of overtime in the year to August.
Liam McArthur, for the Scottish Liberal Democrats, which obtained the figures using freedom of information laws, said: “There will always be occasions where staff are required to work overtime to cover staff illness.
“But the fact that prison service staff worked almost 126,000 hours beyond the terms of their contracts should raise a big red flag.”