The District's prison system has more inmates than at any time in recent history, a situation that will soon force Mayor Marion Barry to declare a second prison emergency and release hundreds more inmates early, law enforcement, corrections and other city sources said yesterday.

Corrections sources also said that the controversial guidelines that dictate which prisoners are eligible for early release are being rewritten "quite extensively" to prohibit the release of certain categories of violent offenders who were freed early under the temporary emergency last summer.

Corrections Director Hallem H. Williams Jr. would not comment on whether the release guidelines were being revamped, but he said that a prison emergency will be declared within two weeks.

Under a law that went into effect Nov. 14, the mayor permanently has the power to ease prison crowding by declaring a state of emergency and releasing certain inmates early when the prison system's overall population exceeds its official capacity for 30 consecutive days, which is a nearly constant state of affairs in the District.

Barry has ordered Williams and Corporation Counsel Frederick D. Cooke Jr. to submit a report to him by Friday detailing the extent of the crowding problem and actions that the department is considering to relieve prison conditions, according to a Nov. 13 memo written by Barry.

Corrections officials said yesterday that 8,029 prisoners were jammed into the city's prisons, compared with 7,950 inmates who were held in city prisons and halfway houses when Barry declared the city's first prison emergency July 3. The prison system is supposed to hold about 7,350 inmates, according to a "rated capacity" order that gives each prisoner about 60 square feet of living space.

Although 815 prisoners were released early under the temporary program, which began in July and ended Oct. 1, the city's prisons have gone over capacity once again. "There is no space for anybody," said one corrections source. "Everyone is crowded."

Most of the overcrowding ap- pears to be at the city's so-called Occoquan prisons at the Lorton complex in southeastern Fairfax County.

The three Occoquan facilities house 1,950 prisoners, 669 more than the number permitted under an order by U.S. District Judge June L. Green. Lorton's Central facility, the District's main medium-security facility, holds 1,271 prisoners; its limit is 1,166.

Last month, critics raised serious questions about the District's ability to handle the early-release program.

They charged that the program was hastily prepared and sloppily managed and that city officials violated their commitment to release only prisoners convicted of nonviolent crimes.

This fall, a dispute ensued about what categories of criminals were allowed to be released under the emergency program. Although the District said it based its release guidelines on the definition of crimes under the early-release law passed by the D.C. Council in June, discrepancies about what constituted a violent crime emerged.

Barry said during the summer that "no prisoner convicted of a violent crime will have his sentence reduced under the emergency law." Robbery and assault are considered violent crimes by the federal Bureau of Justice Statistics and the D.C. criminal code.

About 140 of the inmates granted early release by the corrections department had been convicted of such crimes as robbery and assault, as well as a wide range of other serious crimes, including illegal drug sales and weapons violations, according to a review of the department's records.

Williams said at the time that inmates convicted of robbery or assault were not specifically ruled out by the law.

Sources said yesterday that corrections workers have been asked to rewrite the release guidelines to conform with the D.C. code.

Rep. Stan Parris (R-Va.), a longtime critic of the District's prison system at Lorton, which is in his congressional district, fought vigorously in Congress this fall to overturn the early release program. Congress had 60 days to review the law because it proposed a change in the D.C. criminal code.

Parris said yesterday that he be- lieves that the closeness of the vote on his measure -- it lost by 10 votes in the Democratic-controlled House -- is forcing the city to tighten regulations for the next early release of inmates.

"This is what we've been urging them to do," said Parris. "If they do it, that's a giant step in the right direction."

In a report released last month, the corrections department acknowledged that it freed early five prisoners whom it should not have released under the plan, but it said that otherwise the program was implemented efficiently and effectively.

Williams has said several times that the program is not a solution to the District's prison crowding but a stop-gap measure to ease conditions by granting early release to offenders who were going to return to the community in a matter of days or months anyway.

Critics, however, argue that other jurisdictions that have implemented such plans have complemented them with more long-term solutions to prison crowding.

"Unfortunately in the District, the only thing they've got going for them {to reduce crowding} is early release," said Parris. "That's the disappointing part."