The New South Wales prison population has reached a record high of more than 12,700 inmates, largely due to the number of them being refused bail.

The Bureau of Crime Statistics and Research says the state’s adult prison population surged by 16% over the past two years to hit 12,729 as of December.

“The rapid build-up has been accompanied by an increase in police recorded assault offences, which is of obvious concern to both inmates and staff,” said Don Weatherburn, the bureau’s director, on Monday.

The growth rate, however, appears to be slowing. While the average annual rate of growth in the year to December 2015 was 11.7%, this has dropped to 3.8% in the 12 months to December 2016, according to Bocsar.

Meanwhile, the number of juveniles in custody has been falling rapidly over the past five years. There are now 250 juveniles in custody, a drop of 38% from a peak of 405 detainees in June 2011.