Northern Virginia lawmakers, firing the first shot in what promises to be a lengthy budget battle, today warned they will oppose any tax increase for state highways that is not tied to increased money for their region's Metro transit system.

In an unusual show of unity, the legislators voted unanimously to support proposals to force the financially troubled state Highways and Transportation Department to spend more money on Metro and to upgrade the status of mass transit within the agency.

Without more Metro money, the lawmakers told Highway Commissioner Harold King, Northern Virginia's 21-member House and eight-member Senate delegation could be expected to vote as a block next year against any move to raise state gasoline taxes to help bail out the agency. Although Gov.-elect Charles S. Robb has not formally endorsed such a tax, it seems certain to be considered by the General Assembly when it convenes in January.

Robb said during his recent campaign that the highway department may face disaster without new revenues and King has said he favors imposing a 4 percent tax on the wholesale price of gasoline, which would add at least 4 cents a gallon to retail prices.

Today the legislators from the Washington suburbs -- the largest regional delegation in the legislature -- made clear that they are united on the issue. "I think we've gotten that message across to Mr. King," said Sen. Adelard L. Brault (D-Fairfax), the caucus chairman, who predicted the delegation would continue to eschew party lines on the tax question. "If there's one issue that brings us together, it's transportation."

Fairfax Del. Robert E. Harris, a conservative Republican who often has fought with the region's Democratic leaders, agreed. "There's a real area of common interest that merits a united Northern Virginia front, and I see no signals that that will unravel," he said.

King, who attended the session, left without comment. Later in the day, highway department spokesman A.W. Coates said of the Northern Virginia action: "It's certainly been heard."

The shortfall in Virginia highway funds -- similar to those facing most states -- is due to a dramatic dropoff in gasoline sales, which provide most of the revenues that fund road building programs. Coates and other department officials have warned Virginia could lose $875 million worth of federal highway funds over the next six years because of lack of matching state monies.

One way the department has suggested of dealing with the shortfall would be to sharply cut state money for Metro. The transit system, which received nearly $22 million during the last two-year budget cycle, would get less than $14 million over the next two years, under the agency's preliminary proposal.

That proposal has deeply angered Northern Virginia lawmakers and Metro officials, who say the department has shortchanged the Washington suburbs. "It looks like the highway department split up its mass transit money by satisfying everybody else and then gave Metro what was left," said Stephen Roberts of the Northern Virginia Transportation Commission.

The Metro battle is one of several shaping up for the 1982 session. Northern Virginia gasoline retailers are expected to push for repeal of a regional 4-cent-per-gallon gasoline tax increase passed two years to help finance Metro. They say the tax has driven away motorists and hurt their sales. Also, a legislative commission that has studied the highway agency's policies and management for two years is expected next week to recommend a major overhaul of the department and suggest increases in state auto licensing and truck taxes.