The last three of the eight prison guards at the Maryland Correctional Institution in Hagerstown who were accused of beating handcuffed prisoners nearly three years ago have been cleared and ordered reinstated with full back pay and benefits.

State Personnel Secretary John F.X. O'Brien has repeated a decision made by his department in previous hearings that the charges against the three guards should be dismissed.

The men have been on duty during the appeal process, according to J. Edward Davis and Monica L. Newman, lawyers who represented the guards for the Maryland Classified Employees Association.

The lawyers said they have filed grievances for promotions on behalf of two of the guards cleared, Sgt. Michael G. Shirk and Cpl. John D. Ankeney.

The third guard, Lt. Clyde E. Moser, remains on duty in that rank, the lawyers said.

Four other guards accused of assaulting prisoners received 10-day suspensions, but lawyers won appeals in those cases earlier this year.

Another guard whose dismissal was sought, Irvin L. Clingan, had a heart attack during the earlier hearings and later retired with the charges being dropped.

Six inmates had alleged that the guards had verbally and physically assaulted them after they had been transferred to the maximum security prison after a confrontation between a guard and prisoner at the Maryland Correctional Training Center, also in Hagerstown, on Oct. 16, 1982.