The reluctance of state officials to spend $500,000 on a new lock system for the 19th-century State Penitentiary scheduled to close led to a tense 71/2-hour standoff between rebellious inmates and guards.

The estimated 65 inmates, whose cells were padlocked individually over the summer as the master locking system broke down, "were concerned about the locking system and our efforts to repair it," penitentiary operations manager Dwight Perry said after Thursday's incident.When inmates refused an 8:10 p.m. order to return to their cells, guards armed with semiautomatic weapons ringed the catwalks and the troopers in riot gear moved in with billy clubs and police dogs.

Violence was averted, Perry said, because a show of force is often as effective as the use of force. "Good corrections management," he called it. No injuries or damage to the prison was reported.

There was no word on any concessions to inmates - the old padlocks were put back on the cells at the end of the incident - or any word on possible disciplinary action.

Inmates feared the antiquated system might leave some inmates trapped in their cells if a fire ever broke out.

The standoff began at 3 p.m. when the inmates refused to return to their cells for a routine head count. Yelling from behind razor wire at reporters gathered outside, they made pleas for the dinner that officials never served.

Perry acknowledged piecemeal repairs have been made to the locking system in recent years but said "to completely put in a new system, the estimate I've heard is over a half-million dollars."

Perry said since locking systems have to be built-in to prevent inmate tampering, "it takes time. There's no way a new locking system can go in overnight."