Legislation that would funnel millions of long-awaited federal dollars for road building and repairs to the District, Maryland and Virginia died yesterday as the House and Senate failed to reach agreement on a $7.2 million highway bill as the 98th Congress neared adjournment.

The jurisdictions had been awaiting passage of a highway bill since last year to free their $500 million share of the funds. Some of it was destined for Washington-area projects, including improvements on the Baltimore-Washington Parkway and a landscaped plaza and walkway over Rte. 66 in Rosslyn, according to area transportation officials.

"It is inconceivable that Congress would adjourn without addressing this problem," Hal King, Virginia's commissioner of highways and transportation, said as Congress rushed through its final days. "The money is there in the bank. It is public funds -- the taxpayers' money -- and people are expecting these projects."

The money locked away in the federal government's transportation trust fund comes from the 9 cent-a-gallon federal gasoline tax. Congress needed only to pass the highway bill, which includes a state-by-state distribution formula, for them to be freed. But the bill became bogged down in fights over more than $600 million in politically charged pet projects lawmakers have tacked on as amendments.

Yesterday, when a House-Senate conference seeking a compromise broke down angrily on that issue, there was a great deal at stake for local jurisdictions.

King said that Virginia has used about $66 million in state funds to keep projects going and needs the federal reimbursement. "We can't advance any more funds," said King. "The cupboard is bare."

The District is "desperate" for the $58 million it is due from the trust fund, Sarah Campbell, federal affairs director of the D.C. Department of Public Works, said last week.

Campbell added that every time the distribution is delayed "we go through a chaotic period and projects languish."

Both Virginia, which is awaiting the release of about $220 million, and Maryland, which would gain about $240 million from the bill, had some added stakes in getting the measure passed this year.

It includes language that would free an additional $65 million in federal funds to maintain and improve the Baltimore-Washington Parkway, according to aides to Sen. Charles McC. Mathias Jr. (R-Md.).

Another provision is the key to a major reallocation of federal funds to complete an 18-mile gap in western Maryland's National Freeway. The state will have one more chance next year to win such a provision. But without congressional approval, the state would not be able to reallocate $55 million for the freeway project, officials said.

The measure also included language to allow Virginia to continue collecting tolls on the Richmond-Petersburg Turnpike until 1990 to raise about $50 million for use on other local highway projects.

The tolls were supposed to be lifted next year. However, when the highway bill appeared to be a lost cause, aides to Sen. John W. Warner (R-Va.) and House members rushed through a bill allowing the toll extension.

The highway measure's death keeps funds for these other local projects locked up:

In the District, funds for repairs on Southern Avenue and about $1 million to buy gas masks for D.C. firefighters assigned to respond to fires in the Metro system.

In Maryland, $50 million for badly needed road work in Baltimore.

In Virginia, $75,000 to study the addition of another lane on the Theodore Roosevelt Bridge; $50 million to build a new bridge across the James River; and $15 million for a bypass around Richmond on I-95.