A federal judge in Maryland ruled yesterday that Somerset County's at-large election system unlawfully dilutes black voting strength and ordered county officials to institute election by district.

U.S. District Court Judge John R. Hargrove found the county in violation of the federal Voting Rights Act and approved a plan that provides for the creation of five election districts, one of which would be 64 percent black. The plan was worked out as part of a consent decree between the Maryland attorney general's office and two black voters who had sued county officials.

One-third of Somerset's population of 19,000 is black, but voters have never elected a black to the County Board of Commissioners or Board of Education, according to the attorney general's office.

Yesterday's decision will make Somerset County the fifth Eastern Shore jurisdiction to end at-large elections in the last year.

"The State of Maryland is committed to the principle that all citizens are entitled to full partnership in the conduct of government," Attorney General Stephen H. Sachs said in a prepared statement after yesterday's ruling.

A 1984 election audit by the attorney general's office found that Somerset County, one of the most impoverished jurisdictions in the state, is a racially polarized area where blacks are "largely estranged from the processes of decision-making," partly because of the at-large election system. Election by district makes it easier for black candidates to win elections because black voters are often concentrated in certain geographic areas within a majority-white county or city.

"What's happening on the Eastern Shore is what happened in Mississippi and Alabama 20 years ago," said C. Christopher Brown, attorney for the plaintiffs. "There's going to be a new generation of black leaders," he said. "In five or six years, there is going to be a whole different political scenery on the Eastern Shore."

Dorchester County was forced to scrap its at-large election system last summer under terms of a consent decree reached with the U.S. Justice Department, which had sued the county for violations of the Voting Rights Act. Three towns -- Princess Anne, Snow Hill and Pocomoke City -- also agreed in the last year to abandon at-large elections after being sued by blacks.

A month ago, Pocomoke City elected its first black council member.

Two other Eastern Shore towns, Easton and Salisbury, also have been sued for allegedly discriminatory election practices, but those cases have not yet been resolved. Annapolis adopted redistricting plans in recent years that give black voters majority representation in two of the city's eight wards.

Similar voting rights suits have been filed recently in Virginia, and as a result, the town of Warrenton became the sixth locality in the state last month to drop the at-large election system.

The suit against Somerset County was brought by John H. Padgett and James Mullins. County officials could not be reached for comment, and James Houlihan, an attorney for the school board, said he did not know if the decision would be appealed.