At 3:22 a.m. yesterday, Prince George's County Sheriff James V. Aluisi followed a storming phalanx of 67 riot-equipped deputies, county police officers, Maryland state troopers and five German shepherd dogs into a second-floor cell section at the county detention center in Upper Marlboro.

"It was like a horror movie," Aluisi said. Three hours earlier, 16 of the jail's 18 guards had walked out on strike against the county, leaving more than 550 inmates largely unguarded.

"There were two fires going from different matresses," he said, "glass was all over the floor, steel bunk beds were ripped off the walls . . . The inmates were everywhere, screaming at us . . . The adrenaline was going like mad.

"We expected a fight," Aluisi said, "but thank God we didn't get it."

Instead, only 24 minutes later, it was over.

More than 200 inmates had gone on a rampage, causing an estimated $50,000 damage to the jail. But when the police moved in, there were no confrontations, altercations or bloodshed.

Earlier in the morning, a peaceful outcome had seemed far from likely. For 3 1/2 hours, scores of officers in flak jackets, gas masks and helmets, and wielding riot batons, waited on surrounding parking lots for the word to attack, while police helicopters circled over Upper Marlboro, flashing spotlights on the eerie predawn scene below.

It was a tense three-sided drama, with the police and Aluisi on one side. On another side were the inmates. The jail, originally intended to hold 143 inmates, contains more than 550 today. The facility is divided into an old section and a new section, built in 1978. The uprising occurred in the new section and involved some 200 inmates.

The third side of the drama included the striking guards who, like the inmates, have complained about the overcrowded conditions and have demanded salary and cost-of-living increases.

The county's 126 correctional officers, members of the American Federation of State. County and Municipal Employees, voted Monday night to join the union's other four locals and go out on strike. The guards local, headed by Steven Tanhauser, decided to start the strike at midnight, despite a last-minute injunction against the move by a circuit court judge.

Eight off-duty correctional officers entered the jail shortly before midnight, informed the night shift commander that they were taking a strike action and proceeded to round up the night-shift guards. Sixteen of the 18 guards on duty walked out, but before doing so the guards tried to secure the jail.

"We took everything that could be used as weapons out with us -- razor blades, handcuffs, leg irons, waist chains, and kitchen utensils," said Sgt. John King. "We cut off power that opens the gates inside and outside the building and secured the guard booths as best we could."

At 12:10 a.m. after the guards walked off, county corrections administrator Maj. Jerry Rice phoned Aluisi to say "there's trouble here." Rice, hearing the inmates smash windows on the second floor of the jail, ran outside and pointed a shotgun at the windows above.

The guards left on duty then retreated to a control center on the first floor of the facility. team of 20 deputies and left for the jail. When he got there, he was told by some of the picketing guards that inmates were breaking out the barred windows inside one section of the six-section facility. During the next three hours inmates took over over three sections on two floors of the three-story brick jailhouse.

The inmates were barred from moving freely inside the building by the electric gates adjoining different cell sections. The power operating these gates had been cut by the striking guards.

The inmates -- most of whom were awaiting trial or serving short sentences -- were able to rip apart bunk beds and ram sections of steel through several of the reportedly bullet-proof, glass-enclosed guard booths.

There, some records were burnt and outside telephone calls made. A man identifying himself as "Film-Flam" called The Washington Post and said "crazy people in here" were destroying the building and burning matresses.

At 2:25 a.m., Flim-Flam pleaded over the phone, "Man, we need help . . . When the guards left they took the fuses and nothing works . . . We can't get the doors to work. If there's a fire, we're all gonna burn to death. You gotta help us."

Sheriff Aluisi, meanwhile, had gathered his special team outside, along with 27 county police officers and 20 state troopers. Between 2:30 a.m. and 3:15 a.m., Aluisi made final preparations for the assault. No firearms were to be carried by the authorities, and tear gas would be used in case of a defensive withdrawal.

Then, at 3:22 a.m., the sheriff gave the word to move.The police force climbed an outside stairway to the second floor and an officer called out: "We're coming in. We have dogs and an assault team. Get back in your cells."

The dogs, on leashes, charged forth. "Everybody's emotions were real pent up," Aluisi said. "But when the inmates saw us and the dogs they just scrambled back."

At 3:30 a.m. the second floor was secured. Seven minutes later the third floor was secured. By 3:46 a.m. the inmates were locked into their cells. The officers regrouped then and assayed the damage: Burned mattresses, broken light bulbs, jammed doors, broken windows. According to deputy sheriff James Hubbard, most jail records were also destroyed.

Inside the old section of the county jail, it was quiet throughout the night. The section's 215 inmates, many of whom are state prisoners awaiting assignment to state prisons, have served longer sentences than those in the new section, conditioned to the overcrowded environment. Both wings of the jail are so packed with inmates that dozens of men sleep in hallways and on recreation room floors.

Throughout the day yesterday authorities conducted several shakedowns, looking for weapons and trying to identify inmates whose records were destroyed.

A force of more than 30 state troopers assumed the duties of the striking guards, who claimed victory on at least one of their demands yesterday when state corrections officials transferred nearly 100 state prisoners to the Maryland Penitentiary in Baltimore.

County Executive Lawrence J. Hogan, irate over the walkout and the uprising, proclaimed something else. During a press conference yesterday Hogan said "Corrections Department employes who have been involved in the illegal strike have been sent registered letters advising them of their dismissal. "Of the 126 corrections officers employed by the county jail facility, only five declined to join the strike.

Meanwhile, Aluisi who was praised by Hogan and the guards alike for his handling of the incident, sat slumped in a chair in his office. "One guy was bit by a dog," he said. "Didn't even break his skin. I wish it didn't have to happen, but I'm glad the way it all turned out."