A Maryland law under which men could be fined or imprisoned for failing to support their wives has been declared unconstitutional by the Court of Special Appeals because it discriminates against men.

Judge Charles E. Moylan ruled that the 1896 law violates the state's Equal Rights Amendment passed in 1972.

While the law accurately reflected the ethos of the 19th century, the judge wrote, the Equal Rights Admendment better reflects the spirit of these times.

The law had been most frequently applied to men who did not provide financial support to their wives during the period between separation and divorce. The ruling, as a result, does not affect the application of existing alimony or child-support laws in Maryland.

Nonetheless, the ruling may have broad impact, especially in welfare cases. In the past, welfare officials said yesterday, women separated from their husbands could receive welfare only if they assisted in tracking down the errant husband.

The husband, threatened with prosecution under the old law, frequently resumed support payments to the wife.

Now, however, officials raise the prospect of having to provide welfare to more women simply because the threat of prosecution no longer exists and many men may be less inclined to resume or continue support payments.

"To establish that it is a crime for a husband to desert his wife but no crime for a wife to desert her husband," the judge held, "and to establish that it is a crime for a husband to fail to support his wife but no crime for a wife to fail to support her husband is to establish a distinction solely upon the basis of sex."

Judge Moylan cited a state Court of Appeals decision in July that declared that divorced women who are able to do so must help support children of the marriage.

In 1975, Maryland law was amended to provide alimony payments for either spouse.

Although no precise figures were available, those familiar with the situation said few men are in Maryland jails for violations of the now nullified statute.

For example, no men are incarcerated in Montgomery County and only a few in Baltimore under the criminal nonsupport statute, officials said.

Nevertheless, the decision was lauded by men's rights groups and the governor's commission on the ERA as another benchmark in Maryland's progress toward equality in divorce proceedings.

In recent years attempts have been made in the General Assembly to "decriminalize" nonsupport and leave the matter for the civil courts, which handle the preponderance of divorce matters.

"There are plently of other ways to deal with nonsupport, such as liens against salary or attachment of property," said Kathleen Friedman, chair-person of the state ERA commission.

Leonard J. Kerpelman, counsel for MEN (Male Equality Now) International, which has 3,000 members in Maryland, praised the decision as "quite a breakthrough."

However, he added that, as far as members of his organization are concerned, the state has a long way to go before men have equal rights with women in divorce cases.

Kerpelman, a Baltimore lawyer, said men still face great difficulty in winning custody of children and alimony payments from their former wives.

His group also supported General Assembly bills urging jury trials in divorce cases but such legislation has never gotten out of committee.

Separation agreements should be made illegal, he contended, because "women usually walk off with everything." "Our exhibit A on that subject isMarvin Mandel. All his problems began with his separatio Marvin Mandel. All his problems began with his separation agreement," Kerpelman said.

The court decisions came in the case of Lewis F. Coleman of Queen Anne's County. He was convicted in December, 1976, for failing to support his wife and was sentenced to 30 days in the custody of the county sheriff. His sentence was later suspended and he was placed on three years probation.

During Coleman's trial, the issue was raised whether a law is constitutional if it penalizes a man for failing to support his wife but makes no provision for prosecuting women under similar circumstances.

At the time the law went into effect, said Judge Moylan in his decision, society believed that a woman deserted by her husband should not become a ward of the state. This is no longer the case, he said.