Early in the trial of a Maryland penitentiary inmate accused of murdering a guard there last year, defense lawyer Anton J.S. Keating walked up to the jury with a box filled with graphic evidence of life in the prison's infamous South Wing.

He dumped before the gaping jurors a spectacular array of 70 homemade knives and other weapons confiscated during the past several months from inmates in the South Wing, which houses the most troublesome and assaultive prisoners from throughout the state.

In the South Wing, Keating contended later, "It's reasonably prudent for any individual . . . to arm himself."

Keating's client, Nathaniel Appleby, a 25-year-old convicted murderer, faces a possible death penalty in the fatal stabbing of Herman Toulson, 39, the first Maryland prison guard killed while on duty.

The trial, now in its third week, has focused as much on conditions in the South Wing and the actions of guards there -- including their admitted brutal beating of Appleby after the stabbing -- as it has on Appleby himself.

"It's gone about how I expected," said State's Attorney Kurt L. Schmoke, who is leading the prosecution. "We put him on trial and he puts the prison on trial. Obviously Keating's theory is to try to get the jury to balance one against the other, that is, the death of Herman Toulson with the conditions of the prison, and it's our goal to try to keep the things separated."

Keating, in essence, agrees with Schmoke's assessment. By "throwing all that stuff in front of" the jury, he said yesterday, he was trying not to obscure the stabbing incident but to put it in context.

"It's essential to the defense of a case in any killing to bring out the environment in which the killing happens," he said. "Obviously it's different if it happens in the country club, different if it happens in a sleazy bar and different if it happens in the penitentiary."

Prosecutors have contended that Appleby, acting without provocation, stabbed Toulson with a homemade "shank," or knife. The incident, they said, occurred when Toulson ordered Appleby back to his cell at the end of the alloted daily half-hour exercise period in the narrow walkway alongside the row of cells.

"It's the most senseless thing I've ever seen in 13 years working in the system . . . cold-blooded murder," one guard testified.

But Keating has argued that Appleby was forced to carry the knife to protect himself against other inmates. Appleby stabbed Toulson only in self-defense after he was "savagely beaten" by Toulson and other guards, Keating said. He said guards beat Appleby again after the stabbings and later tried to cover up their actions by blaming his injuries on a fall down several flights of stairs.

"After his arm was broken, after he thought he was going to die, then he struck back," Keating said of Appleby in an opening statement.

Already serving a sentence of life plus 16 years, Appleby is also charged with attempting to murder guard Willie J. Newkirk, who summed up the situation in the South Wing during his testimony as "a lot of powder keg in one area."

Prosecutor Schmoke himself, in opening arguments, called the South Wing "the meanest, toughest area in the meanest, toughest prison" in the state, "a culture unto itself."

Testimony from guards and inmates has amply supported that billing.

On the first day of testimony, Newkirk testifed that inmates fashion weapons from "metal on beds, buckets. They make them out of anything . . . . "

But perhaps the most gripping testimony so far has been about how guards, enraged by the attack on fellow officers Toulson and Newkirk, brutally beat Appleby and other inmates after the stabbings.

Appleby was hospitalized after the incident with a broken arm and 108 stitches to his head and face. Inmate Andre Swann suffered two broken hands and other injuries.

Several guards admitted in court that they omitted the beatings from their reports on the incident. They denied participating in the beatings, and they said they cannot recall the name of any individual who took part.

After guards dragged Appleby from his fifth-floor cell to the Special Behavior Confinement Area, known as "The Hole," "I just seen him mobbed and I just turned away," Officer Allen Wright testified last week.

"A whole bunch of officers came and jumped on him," Officer Roosevelt Anderson said. "They started beating him and kicking him . . . . It was chaos, like a mob scene . . . . They were out of control."

While Anderson "didn't have the opportunity to jump on" Appleby, he said, "Under the circumstances, Toulson being a close friend for the last two years, yes, I would have [beaten him]."

Guard Terry R. Boyd testified that a supervisor, Capt. Irvin Hawkins, ordered subordinates to remain quiet about Appleby's beating.

"He murdered my friend, split him open like an animal. He was lying there with his intestines hanging out," Hawkins said outside the hearing of the jury. Hawkins denied ordering guards to fabricate their reports, but he added, "You think I cared that they beat him up? I didn't care then and I don't care now."

Four days later, testifying before the jury, Hawkins expressed remorse that Appleby was beaten. His change of heart, he said, came after "I got the chance to say all that was in my mind . . . about the murder of Officer Toulson, the awesome murder."

The trial, before Judge Arrie W. Davis, is expected to conclude by next week. If convicted, Appleby faces a separate sentencing proceeding on whether the death penalty should be imposed.