BALTIMORE (AP) _ A federal judge ordered a rural county to let voters cast up to five ballots each to give blacks a better shot at a seat on the five-member county commission.

In a ruling described as the first of its kind, U.S. District Judge Joseph H. Young ordered the setup for Worcester County on Tuesday after lawyers could not agree on a new system.

Commissioners said they will appeal.

Under the judge's order, all five commissioners would still be elected from the county as a whole rather than from districts. But voters would get five votes to use any way they want, spreading them among candidates or giving them all to one. The idea is to allow votes from black voters to accumulate for black candidates.

So-called cumulative voting was one of the controversial ideas supported by Lani Guinier that led President Clinton to withdraw her nomination to head the Justice Department's civil rights division last June.

Other parts of the country have implemented similar multiple vote systems, but this is the first time one has been court ordered, according to the American Civil Liberties Union and the Center for Voting and Democracy in Washington.

In 1988, Chilton County, Ala., reached a settlement in federal court to increase black voter participation by having each voter cast seven ballots for the county commission and school board. The plan worked; there is one black member among the seven in each governing body.

Young's order came after the ACLU and the National Association for the Advancement of Colored People filed a lawsuit claiming Worcester County's at- large voting setup was racially biased.

Young ruled in January that the system violates the Voting Rights Act of 1965 because it dilutes the black vote. Blacks make up 21 percent of the county's 35,000 residents, but no black has ever been elected to the commission.

The judge said cumulative voting is ''a less drastic remedy'' than creating districts.

But Ben Griffith, the lawyer who represented the sparsely populated county along Maryland's Atlantic Coast, said the system could encourage race-based voting on the part of both blacks and whites.

''I think it will actually aggravate any racial problems,'' he said.