Rebellious inmates at the West Virginia Penitentiary today released their remaining seven hostages unharmed. Gov. Arch A. Moore Jr., who helped negotiate their release, entered the prison to escort each captive to freedom.

Heavily armed guards immediately moved in to regain control of the aging prison that had been in inmates' hands since a New Year's Day takeover that claimed three prisoners' lives.

The last seven hostages, all looking tired and some wearing socks but no shoes, walked one by one from the prison's south gate to waiting ambulances while television cameras rolled in accordance with inmates' demands.

As part of the arrangement that freed the captives, Moore agreed to meet with an inmate grievance committee -- consisting of five convicted murderers, one armed robber and one thief -- to hear prisoners' complaints about cramped and cold cells, bad meals and poor sanitation.

Moore met with the prisoners for about 90 minutes and emerged saying he had listened to their complaints but had made no promises.

Earlier today Moore appeared to back away from the part of the agreement guaranteeing amnesty for riot leaders after it became apparent that inmates may have been executed by prisoner tribunals set up during the siege.

At a news conference packed with more that 100 reporters, Moore said, "I think that a group in the institution sat both as judge and jury -- and executioner. I think they sat there and went very methodically through a list of charges."

The three dead inmates, two convicted murderers and one kidnaper, were found with their throats slit and otherwise stabbed with crude weapons, Moore said.

He said the amnesty to which he agreed meant only that the inmates would not be physically punished because of the takeover. "They will be secure in their person," he said, "will not be beaten or clubbed in any way as a result of this disturbance. We have surrendered nothing as to the legal process."

Moore also gave new details about the hostages' captivity. Sixteen were taken initially and released in stages -- three early in the siege, six Thursday after the agreement was reached and seven today. "They were handcuffed. They were blindfolded. They were moved repeatedly throughout the institution," Moore said.

As they were led from the prison, the seven -- six prison guards and one food-service worker -- were greeted with shouts of "How are you feeling?" and "How were you treated?" by reporters and photographers pressed against the prison fence.

"Good!" shouted back John Wilson, describing his treatment. Wilson, a guard, was the first to emerge.

"Fantastic," deadpanned Bill Henderson, the food-service worker and the last hostage freed.

The seven were to have been released at noon according to a timetable laid out in the unusual agreement. But a hitch developed when the inmates in control of the prison demanded that the release be broadcast on live television.

That last-minute demand sent John Price, the governor's press secretary, running along the line of cameras shouting, "Who's on live? Who's on live?" Then the release was orchestrated, with attention to camera angles, for live coverage on the local noon news shows.

Throughout the siege and takeover, which began with knife-wielding inmates disrupting the New Year's dinner, the prisoners displayed acute sensitivity to the power of the news media.

They insisted on talking to reporters as one condition of releasing the hostages, and the West Virginia press was on hand to witness the signing of the agreement.

Moore said his decision to meet with an ad hoc inmate grievance committee was meant in part to set in motion a formal procedure for prisoners to air their gripes.

In his press conference, Moore, who was governor in 1969-77 before being reelected in 1984, blamed the prisoners' frustrations partly on the breakdown of an internal council and similar mechanisms of "inmate democracy" that he said were dismantled after a violent mass escape in 1979.

"As a direct result of that breakout . . . there was a strong feeling that a number of the humane treatments did not encourage good behavior on the part of the inmates," Moore said. "The facility at one time had a broom factory, clothing factory, tailor shop and soap factory. Now there is, very frankly, too much idle time on prisoners' hands." The factories and various inmate councils and committees were abolished after the escape.

Moore said yesterday that the inmates' deaths will be investigated and that grand jury indictments may be sought on kidnaping charges against those involved in the hostage-taking.

That statement seemed to contradict earlier official statements that the agreement with the inmates precluded any prosecutions for the riot and takeover. "We intend to inquire into any criminal acts that took place," Moore said.