James T. Merritt walked out of D.C. Jail a free man yesterday, released by a federal judge who said his imprisonment "shocks the conscience of the court."

U.S. District Judge Harold H. Greene released Merritt two days after hearing him testify that he had three times in 1976 -- while a Maryland state prisoner -- tried to find out from federal authorities when he should begin serving an outstanding 1- to 3-year federal prison term.

Told by U.S. marshals he could ignore that sentence then, Merritt won release from state prison, became a minister, got married, had a child, and formed a thriving business. Four months ago, federal authorities came for him and took him to jail for that old prison term and he has been there since.

Merritt, 31, who the judge has described as being "plucked from a wholly peaceful and prodcutive life," said he had been frustrated by his latest experience with the criminal justice system and felt "terrific" in being reunited with his wife and child yesterday.

"The toughest part [of being in prison] is when you separate a man from his family," Merritt said yesterday afternoon after his release. "It's frustrating to see your family in need and not be able to do something about it."

Merritt said he was talking a shower in D.C. Jail yesterday afternoon around 2:45 p.m. when a guard told him to return to his cell and assemble his belongings. He said he though federal marshals had come to take him back to the Allenwood, Pa., prison where he was serving his term.

When they walked out the gate, he asked where they were taking him, he said. "We're taking you outside and that's all," the marshalls replied, according to Merritt, giving him a lift to a nearby subway station so he could go to his Laurel home.

The government, citing an 84-year-old legal decision that Greene said he refused to abide by because of more "civilizing influences" on the law in recent years, had argued that Merritt should be forced to serve the outstanding federal prison term despite his progress outside of jail.

Greene said the federal warrant for Merritt during that time period "continued to remain in the files, like a time bomb, ready to be activated at any time." He said that Merritt had no obligation to "badger the authorities" to put him in jail after the initial three unsuccessful attempts.

"The law is neither as blind nor as unreasonable as the government's argument would suggest," Greene said in a written opinion yesterday.

Greene said that Merritt had "demonstrated exceptional adjustment and progress" since his release from prison in Maryland.

An order requiring Merritt to remain in jail "would needlessly jeopardize his long-term adjustment to society, disrupt both his family and his family life, and destroy his economic base," Greene said.

Merritt had been sentenced to a maximum of 20 years in prison on Maryland state charges in 1972, but was then placed in a special rehabilitation-oriented program that allowed him to qualify for earlier release. It was through that program that he was able to enter college and began studying for the ministry.

Merritt's past convictions were on charges of drug distribution and receiving stolen property. His federalsentence was for embezzlement from a local bank in 1967, where he was employed as a teller.

Merritt's attorney, Dale Cooter, called Greene's decision "fair and compassionate," and Merritt's pastor, Barry Wood, said Merritt's pastor, Barry Wood, said Merritt's release "was a real answer to prayer. God is the one who out it all together."

Merritt, who testified that he had become a minister who specialized in counseling inmates, said he planned to continue that ministry, especially with "good Christian fellows" he met at the Allenwood prison in recent months.