A federal judge today signed a new consent agreement requiring the Virginia Department of Corrections to live up to its 1983 promises to improve conditions at the state's troubled Mecklenburg Correctional Center.

"I don't have a doubt it will be carried out," said Alvin J. Bronstein, head of the American Civil Liberties Union's National Prison Project. The group has clashed repeatedly with Virginia officials over conditions at the prison, which last year was the scene of riots and an escape by six death-row inmates.

Bronstein and U.S. District Judge Robert R. Merhige Jr. today had nothing but praise for the state's new prison director and his efforts to improve the Mecklenburg prison. The facility has been transformed from its "repressive conditions to a normal prison, which is not saying it is great, but that's what society wants," Bronstein said.

The agreement, which Merhige signed, ends for now a costly legal battle over the prison. Still to be decided is perhaps several hundred thousand dollars in legal fees the state may be forced to pay the ACLU in addition to the costs of the state's own attorneys.

"I hope you can spend less time in here than your predecessors," Merhige said as he congratulated the state's new corrections director, Allyn R. Sielaff. The director generally has been credited with easing tensions at the prison in Southside Virginia.

Sielaff, appointed in November after his predecessor was forced to resign, said the agreement "reflects what we are doing now" in providing basic visitation rights, sanitation, physical exercise, educational and mental health services, jobs and access to lawyers.

The agreement also limits the use of strip searches of inmates, emphasizes that excessive violence by guards will not be tolerated and requires detailed written records of incidents in which prisoners are treated more strictly than others for security reasons.

"This new agreement will . . . accomplish all our objectives . . . " said Bronstein. "For the past seven years we have been telling Virginia officials that the repressive conditions . . . at Mecklenburg . . . would create rather than solve management problems . . . .

"Unfortunately, it took the tragic disturbances of last summer to get [the state to] acknowledge we were right."

Under Sielaff, "all of the worst actors employed by [the state] have either resigned . . . or been transferred," said Bronstein.

The ACLU had sought to win a contempt citation against the state for failing to implement the 1983 plan.

Bronstein said the department "has stopped using the bugaboo" of security as an excuse to avoid treating prisoners more humanely. In October, Merhige sharply criticized the department for engaging in "public relations gimmickry" by overstating security needs.

In contrast, he expressed only a few reservations about the agreement today while generally praising Sielaff. But the judge also warned that he will be watching the implementation of the agreement and said from evidence heard in the case there are probable grounds for a contempt ruling against some department officials.

The state's 17-page agreement was approved by corrections officials as well as Gov. Charles S. Robb and state Attorney General Gerald L. Baliles.