WDSU A gun is seen in a still from the video shown in court in New Orleans

A New Orleans parish released a shocking video on Tuesday that shows inmates doing drugs, gambling, waving a hand gun and drinking beer.

It was the second day of a federal hearing on the Orleans Parish Prison spending money to fix and refurbish jails. It is not clear when the video was recorded.

Manny Romero, a prison consultant who testified, said he had never seen such a dysfunction in a jail and that the amount and nature of some of the contraband suggests prisoners may have had help from jail staff in obtaining it, New Orleans NBC affiliate WDSU reported.

Fights, sexual assaults and drug use among inmates have been going on at the prison for years, according to WDSU. But Tuesday's video was the first time footage of these allegations was seen. The federal investigators said these problems are widespread at the prison.

Sheriff Marlin Gusman issued a statement saying the prison was “in a state of disrepair and abhorrent lack of proper security measures” and that was why he closed it last year.