In a decision that could produce a multimillion-dollar tax windfall for Alexandria and Arlington, the Virginia Supreme Court ruled yesterday that a massive 400-acre rail yard shared by the localities has paid too little in real estate taxes since 1984.

The Supreme Court's seven justices issued a unanimous opinion saying that state officials violated the Virginia Constitution six years ago when they cut by 90 percent the amount of property taxes paid on the Potomac Yard, a switching facility near National Airport between Route 1 and the George Washington Parkway.

The yard, owned by the Richmond Fredericksburg & Potomac Railroad, is the site of a massive development proposal that calls for phasing out most rail operations and replacing them with high-rise office and residential buildings. The project, which would include the construction of two new Metro stations, is one of the largest under consideration in the Washington area.

The court ruled yesterday that the State Department of Taxation, which determines the value of railroad land for tax purposes, had assessed the Potomac Yard at less than its "fair market value," resulting in local property tax bills that are artificially low.

The Taxation Department changed the method it used to assess railroad land in 1984, causing the Potomac Yard's appraised value -- and its tax bills -- to plummet. As a result, politicians adjusted the tax rates on others to make up the lost revenue.

Although yesterday's decision is directed only at the Potomac Yard, it overturns the method used to assess all railroad land in the state and draws into question the taxes paid by two other rail concerns that have major holdings in Virginia: Norfolk Southern Corp. and CSX Corp. Norfolk Southern owns land in Alexandria's Eisenhower Valley that is the site of another huge development proposal.

The Supreme Court ruling was hailed by officials in Arlington and Alexandria, who filed the lawsuit. Alexandria administrators said yesterday that the city "may well receive well over $5 million" in back taxes because of the decision. Previously, officials have estimated that a legal victory could raise RF&P's property tax bill by $2.5 million a year in Alexandria and $600,000 a year in Arlington.

"We are extremely pleased with the Supreme Court's ruling," said Alexandria City Manager Vola Lawson. "The potential financial implications of today's decision are very positive for the city."

Mark Jinks, Arlington's director of management and finance, said the court vindicated the county's contention that the Potomac Yard land "is worth a whole lot more" than the tax value determined by state assessors. "It's good to see the justices completely agreed with our point of view."

Charles Hartz, general counsel for RF&P, said he was surprised by the ruling, which reverses a decision issued in a Circuit Court last year. But he questioned whether the ruling would raise taxes on the Potomac Yard as much as local administrators believe.

"How broad the opinion is, I'm not sure," Hartz said. "We'll just have to wait and see where we go from here."

Spokesmen for the Taxation Department, Norfolk Southern and CSX all declined to comment on the ruling, saying their lawyers had not yet studied it.

The controversy over the Potomac Yard's taxes began when the state changed the way it appraises railroad land for tax purposes. Historically, railroad land was assessed under the same rules local governments apply to residential real estate. Officials determined a tract's maximum potential value -- what appraisers call its highest and best use -- and taxed it accordingly.

But in 1984, despite promises not to, the Taxation Department scrapped that system. The department began assessing railroad property under the so-called unit rule, which does not consider the price land might command on the open market.

Instead, the unit rule estimates the worth of an entire railroad system based on how much money it makes or how much it cost to build.

The taxes on that overall unit value are then divided among localities based on how many miles of track or acres of railroad land each has.

Because of Northern Virginia's high real estate prices, the value of a railroad's land as a potential development site may be far higher than its unit value. When the method of appraising the land was changed, the yard's assessed value fell from $80.8 million to $6.9 million.

The court's decision said that because the unit rule "did not determine the fair market value of Potomac Yard in its particular location, as required by the Constitution of Virginia, we conclude that {the} assessments were invalid and that they cannot be sustained."

Under the court's ruling, the case must now go back to Circuit Court, where a judge must establish a new method of assessment. Arlington and Alexandria officials said they believe that the old appraisal system should be reinstated.

A little less than 25 percent of the yard's land lies in Arlington and about 75 percent is in Alexandria. Both localities are seeking to collect back taxes for the last six years.