A U.S. District Court judge has ruled that the Fair Housing Act can be used to sue insurance companies for allegedly denying homeowners insurance on the basis of the racial composition of a neighborhood.

Civil rights attorneys in Washington said the decision by Judge Carl B. Rubin set a major precedent.; Rubin's ruling came last week in a $4.42 million suit filed last May by a Dayton, Ohio, couple against five insurance companies in Ohio and Indiana and a Dayton insurance agent.

The suit charges that Austin and Mary Dunn were victims of racial discrimination because their $30,000 homeowners' insurance policy, which they held with the same independent company for 22 years, was abruptly canceled in December 1977. The couple claims it was canceled because they are black and their home is located in a predominantly black neighborhood.

In his ruling, Rubin denied a motion by Midwestern Indemnity Co., which sought to dismiss the Dunns' contention that the Fair Housing Act, a section of the 1968 Civil Rights Act, applies to insurance companies.

Rubin ruled that the insurance industry is covered by the act.

Rubin did not rule on whether there was any discrimination. Rather, he ruled the case could go to trial to decide the question.

In New Orleans, a federal appeals court has upheld the right of a community association to sue a real estate firm for allegedly "blockbusting" its racially mixed New Orleans neighborhood.