The race for the Democratic gubernatorial nomination in Virginia took an unusual twist yesterday when the two leading candidates both announced that Sen. Gary Hart (D-Colo.) had agreed to campaign for them.

Virginia Lt. Gov. Richard J. Davis' campaign announced that the former presidential candidate will appear next week at fund-raising event for Davis in Northern Virginia.

Not to be outdone, the gubernatorial campaign staff of Virginia Attorney General Gerald L. Baliles also announced yesterday that the Colorado senator will appear next week at a fund-raising event for Baliles in Northern Virginia.

According to Hart's office, the Coloradan is not endorsing any candidate. Spokeswoman Bess Smith said Hart had a longstanding commitment to help Davis because an old friend, Democratic Party fund-raiser Ronald Dozoretz of Portsmouth, Va., had asked him to. As for Baliles, Hart agreed to help because "he knows how difficult it is to raise money," said Smith.

Meanwhile, Republican Rep. Stan Parris of Fairfax, trying to strengthen his bid for the Republican gubernatorial nomination, charged yesterday that his opponent is a pawn of Richmond "power brokers" and would not represent the interests of the party rank-and-file.

Parris, 55, charged that former state legislator and Richmond lawyer Wyatt B. Durette is a "handpicked candidate of the Richmond power brokers, a group that nominates only those candidates that they control, those who will heed their wishes."

Durrette is leading Parris by a 2-to-1 margin in the quest for delegates at the state party nominating convention this spring.

Parris criticized polls and the press for concentrating on the numbers of delegates selected before people in his home base of Northern Virginia have had a chance to select theirs.