The city of Baltimore and three of Maryland's poorest rural counties filed suit yesterday arguing that the state's system of financing education unconstitutionally discriminates against poor school children.

The suit, filed in a state court in Baltimore, parallels a series of similar legal challenges elsewhere that have brought about sweeping changes in the way states around the country pay for their local schools.

The Maryland suit asserts that because local property taxes are the major source of funding for the state's 24 local school systems, students who live in poorer areas inevitably have "lesser and inadequate educational opportunity."

The existing system is therefore in violation of federal and state constitutional guarantees of equal protection and also of Maryland's obligation to provide "a thorough and efficient system of free public schools," the suit contends.

"An accident of geography ought not to be relevant to the nature of education provided to a child," said Elliott Lichtman, the attorney for Baltimore city and Somerset, St. Mary's and Caroline counties.

The suit charges the wide disparities in the wealth of school districts cheats poor children out of educational benefits like highly trained and experienced school teachers. Baltimore, the suit says, has $33,044 in taxable property for each pupil in its schools; Montgomery County has $105,659.

Baltimore, with a higher school tax, was able to raise only $668 to educate each pupil in the city in 19778 while Montgomery, with a lower tax rate, was able to generate $1,622.

Despite efforts to use state aid to equalize the amount each district has to spend to educate each child, the differences remain great: Montgomery County spent in 1977 $2,152 while rural Caroline County on the Eastern Shore spent $1,415.

Prince George's County, which with $59,100 in taxable property behind each pupil is above average in wealth, also spends more than the state average on each pupil -- $1,711.

In the 1976-77 school year, Maryland had the fourth worst record in the country on equalizing expenditures, according to a recent federal study.

Over the past eight years, the state has created and reworked a complex series of aid formulas designed specifically to narrow the gap between richer and poorer districts, but the suit claims that these efforts have been inadequate.

Even without the spending disparities that exist in Maryland, the suit claims, children from poorer districts are burdened with handicaps that their peers in richer areas lack; they often come from areas that are over-crowded and have high unemployment rates.

These problems are associated with low educational achievement, and "children from economically disadvantaged homes often begin their schooling with learning deficits that can be overcome only by costly compensatory education," according to the suit.

The defendants in the lawsuit, filed in Baltimore Circuit Court, are state Comptroller Louis L. Goldstein, who is responsible for all disbursements of state money and David W. Hornbeck the state superintendent of schools.

In a statement issued through a spokesman yesterday, Hornbeck said. "It is clear there is an unequal distribution of funds in the 24 school systems in the state and a clear correlation between student performance and the amount of funds available, leading to the conclusion that the educational opportunity is unequal."

Jim Brawell, director of labor relations for Prince George's County Schools and a member of a commission that studied Maryland school finances, said he wasn't surprised by the suit. "After spending two years on the commission wrestling with the problem of equal funding and trying to work out a solution, I know that no matter what you do, some districts are not going to come up with what they think is their fair share."

"I think that the court would also have to consider that Maryland did set up this commission, that we came up with a Band-Aid type of solution last year, and that we now have come up with a formula that will get us where we need to be in terms of equality in five years."

The commission on which Braswell served, called the Barnes Commission, proposed a five year plan, now before the state legislature, under which per-pupil costs would be equalized by 1984.

"We didn't want to make all the adjustments immediately, he said. "If you make extreme adjustments in a single year that would cause major funding problems for (some) counties."

The suit proposes no specific remedy, but asks the state courts to require that the Maryland General Assembly modify the existing system and correct the discrepancies, equalizing expenditures for the state's 829,000 school children.

Elliott Lichtman, a partner in the Washington law firm of Rauh, Silard and Lichtman, was also the principal attorney for a similar successful challenge of the financing system of New York's public schools.

In that case, which is being appealed, a New York trial judge ruled that the state must do more than equalize spending -- it must also provide additional help for pupils in large cities, where special programs for disadvantaged students add to costs.

Lichtman said yesterday he is not seeking such a solution in the Maryland suit, but is merely seeking spending equalization.

Earlier school financing cases in California and New Jersey forced those states to pump vastly increased state funds into local schools. In New Jersey, largely as a result of a court order requiring changes in the system of school financing, the state legislature in 1976 enacted the first income tax in the state's history. CAPTION: Graph 1, Maryland's School Financing PER PUPIL SPENDING BY DISTRICT, By Robert Barkin, The Washington Post; Graph 2, EFFECTIVE SCHOOL TAX *, *Per $100 of assessed valuation, By Robert Barkin-The Washington Post.