The manager of a NSW prison has been stood down after a young Islamic State supporter allegedly attacked a former Australian soldier in a jail cell.

The teenager allegedly used a sharp object to carve "e4e" into the man's head, an apparent reference to the terror group's "eye for an eye, tooth for a tooth" mantra, inside the Mid North Coast Correctional Centre in Kempsey on Thursday afternoon.

NSW Corrective Services Commissioner Peter Severin has stood down a prison manager after the attack. Credit:Edwina Pickles

"As a result of that I have decided to suspend the general manager of the correctional centre pending the outcome of this investigation," NSW Corrective Services Commissioner Peter Severin told reporters in Sydney on Sunday.

The 40-year-old victim was reported to be fighting for his life, but is now "close to being released back to a correctional centre", the Department of Corrective Services said on Sunday.