RICHMOND, DEC. 11 -- Like football players sharing the pain of their shaken quarterback, Northern Virginia's seven Democratic senators were left hurting this week after 15 rebellious colleagues challenged the unrivaled power of Majority Leader Hunter B. Andrews.

At first, the seven Democrats from Arlington, Fairfax, Loudoun and Prince William counties fell in behind Andrews to support a former opponent of racial integration for a ceremonial post in the Senate. They lost.

Then they lost two other votes that some fear could cost them an important fourth seat on the powerful Senate Finance Committee -- which dispenses money around the state -- and damage Northern Virginia's prestige and power.

"Our side got whupped," said Sen. Charles L. Waddell of Loudoun.

The Northern Virginians say there has been negligible fallout from their backing of Howard P. Anderson for the job of Senate president pro tempore.

Anderson is a conservative Southside Democrat who supported the state's massive resistance program against integration in the late 1950s.

The two procedural votes were held in a secret caucus meeting here Tuesday and weakened the authority of caucus Chairman Clive L. DuVal 2d of Fairfax County.

More fundamentally, at least to those senators who have long looked to Andrews for leadership and the millions of tax dollars he controls, the votes could represent a sudden shift of power in an institution that despises change. If Andrews was under attack this week, so was the political coalition that has served Northern Virginia so well for so long, senators said.

In interviews this week, most of the region's seven Democrats said that they were quite aware of Anderson's voting record of 30 years ago, one that he defended as recently as 1984. Nonetheless, they said they voted for him because Andrews asked them to and because they thought that Anderson's seniority entitled him to the largely honorary job of president pro tempore.

Anderson was defeated by Norfolk Sen. Stanley C. Walker, by a vote of 15 to 14. Walker was backed by the Senate's three blacks and others from Tidewater and the southwestern part of the state, who have long envied Northern Virginia's ability to win dollars from the legislature.

Andrews "is our majority leader and Finance Committee chairman, and when your leader is trying to put together a coalition, he includes us and Howard Anderson," said Sen. Edward M. Holland of Arlington. "We were looking at it from our situation up here. This was a shot across Hunter's bow."

Prince William Sen. Charles J. Colgan said he "didn't even think about" Anderson's record because "it has very little to do with being president pro tem" and because he thought Anderson's attitudes on race had mellowed over the years.

"Howard Anderson is a fair and reasonable man, regardless of party, sex and race," Waddell said. "He is an honorable man who has changed with the times." Several delegation members emphasized that Anderson worked hard in the legislature two years ago to help elect Irvin D. Sugg, who is black, to a district court judgeship in Southside.

The narrowly approved change in the caucus committee that assigns members to various Senate committees was a byproduct of "pure and simple regional, parochial contentiousness," said Sen. Joseph V. Gartlan Jr. of Fairfax County. "The intent was to make sure that Northern Virginia does not get another seat on the Finance Committee."

Although Gartlan, DuVal and Colgan now sit on the finance panel, the delegation will be fighting to fill one of three vacancies on that committee with Holland, who also will be ascending to the chairmanship of the Courts of Justice Committee next month. If the senators fail and Andrews continues to be distracted by assaults on his own authority, "Northern Virginia will not have the voice it used to have" at precisely the moment when the legislature begins hammering out the 1988-90 state budget, Gartlan said.

Gartlan and his Northern Virginia colleagues also fear the caucus votes may have a lasting impact on the longstanding relationships between them and their counterparts from Tidewater, all of whom, except for Andrews, supported Walker.

"Stanley Walker paid a very high price to get elected president pro tempore," Gartlan said. "He may have destroyed a productive eastern Virginia-urban coalition."