CARACAS, Venezuela (AP) _ President Hugo Chavez announced a prisons emergency Sunday and said the government would accelerate justice for inmates awaiting trial and launch a work-release program to ease overcrowding and violence in jails.

Chavez said teams of judges, prosecutors, human rights activists and priests entered four of Venezuela's most dangerous jails Saturday to speed prosecution and sentencing of inmates.

More than half of the system's 23,000 inmates have never had their day in court. Many have waited years for a trial.

Riots in overcrowded jails across the nation over the past week were partly due to delays in enacting a new penal code that went into effect July 1 and guarantees inmates swift trials.

More than a dozen prisoners have been killed, and National Guardsmen used two tanks to restore order at one jail outside the capital of Caracas.

Last year, 573 inmates were killed in violence nationwide in a prison system considered among the worst in the world.

Chavez's three-month emergency program is aimed at speeding up compliance with the new code.

He said on his Sunday radio program ``Hello, President'' that the prisons teams hope to clear the cases of 6,000 inmates awaiting trial by Christmas, and said many could be released because of time already served.

Chavez said the government also will implement a release program to allow inmates to go to jobs during the day.

The prison system also will begin to segregate inmates awaiting trial according to the crimes they allegedly committed. In many jails, suspected pickpockets share cells with murder suspects.

National Guardsmen spent the weekend sweeping some jails for weapons and contraband, confiscating guns, knives, drugs and other items, Chavez said. He accused prison guards of confiscating weapons and then reselling them to inmates.