Attorney General Dappula De Livera said prisons in Sri Lanka have become "training schools" for criminals.
Addressing a gathering of prison officials, De Livera said there was an "unholy alliance" between miscreant prison officials and criminals operating from the prison.
"These criminals are protecting errant prison officers and vice versa," the AG said adding that not all prison officers were corrupt.
He added that discipline in the Prisons Department has deteriorated and criminal networks are freely operating from prison.
"Stern action should be taken with immediate effect to correct this situation. Otherwise, people will lose faith in the law enforcement process of the country," he added.