For Alan A. Diamonstein, chairman and ringmaster of the often quarrelsome Virginia Democratic Party for the past three years, it is a fitting grand finale.

The Democrats are fighting.

Diamonstein, a 17-year member of the General Assembly from Newport News, recently announced that he would not seek reelection to the grueling chairman's job when the party holds its state convention here June 7.

Along with other party leaders, including Gov. Charles S. Robb, Diamonstein is spending his last weeks in office trying to mediate a nasty delegate credentials dispute between Lt. Gov. Richard J. Davis and state Attorney General Gerald L. Baliles, the party's rival candidates to succeed Robb.

Whatever the outcome, the fight is just the latest in a series of state crises that seem to beset any Democratic chairman in a party where personal loyalties and factions, rather than party unity, often fuel campaigns.

"When was the last time you heard of any chairman seeking reelection?" said party staff member Bernard Craighead, reflecting on the nature of the job.

"To be chairman is not a real easy thing," said state Del. Benjamin Lambert (D-Richmond), a Democratic national committeeman. "One thing about a party that includes everybody, rather than excluding like the Republicans, is that you're going to have to deal with all factions. Alan's done a very good job."

That's not idle praise from Lambert, who clashed sharply with Diamonstein this year.

Diamonstein was embarrassed after word got out during the past legislative sesssion that he presided over an all-white male meeting of state legislators who were worried about the impact of State Sen. L. Douglas Wilder's campaign for lieutenant governor. Wilder is black. Diamonstein later insisted the meeting was an impromptu gathering and not intended as a dump-Wilder session.

Diamonstein said the episode played no role in his decision not to run for reelection, a view backed by others who cited Diamonstein's record in support of minorities and women.

"That the legislative meeting was a real mistake," said Lambert, who also is black. "But I think he's recovered from it."

While Diamonstein is credited with raising more money for the state party, developing mailing lists and hiring a competent staff, he is better known, and in some cases more respected, for his work on the national scene with the Democratic National Committee.

Diamonstein was elected in San Francisco last year to the ruling executive committee of the DNC, and he is chairman of the party's 13-state Southern Caucus, positions he will retain after June.

Much of that national work has been with Robb, who is thought to have national political ambitions after he leaves the governorship early next year. Both Robb and Diamonstein, who has played a low-profile role as party chairman, have been active in a variety of causes and efforts to bring the national party toward a more moderate view.

"Alan has enjoyed working on the national scene. If Terry Sanford the retiring president of Duke University had won the DNC chairmanship, I'm certain Alan would have been a key staff person for him," Lambert said. Robb, Diamonstein and other party leaders led a hard-fought, but unsuccessful, move to elect Sanford.

During the national convention last summer, Diamonstein was a key participant in meetings in which southern party leaders persuaded the campaign organization of Walter F. Mondale that Georgia chairman Bert Lance was not a good choice for DNC chairman.

Diamonstein recently returned from Kentucky, where southern party chairmen and others discussed holding regional or time-zone primaries in 1988, rather than the long and fractious system of last year that many party members said wore out the party before the fall election against President Reagan.

"Now that the Robb administration is winding down, I've got to pay more attention to my law practice," said Diamonstein, who specializes in corporate and development law.

Diamonstein, who is considered a key adviser to Robb and was influential in raising money for him in Robb's successful 1981 race for governor, was elected party chairman in 1982, shortly after Robb took office.

Diamonstein's likely successor is state Del. Richard M. Bagley (D-Hampton), who is giving up his House seat and powerful post as chairman of the Appropriations Committee to run for party chairman. Bagley makes no secret that he wants the job to build the party and prepare his own campaign for governor in 1989.

Diamonstein replaced state Del. Owen B. Pickett (D-Virginia Beach),who had resigned to mount a campaign for the U.S. Senate that collapsed when Wilder and other party officials objected to his conservative credentials and what they said was his poor campaign style.

While Pickett, like other former chairmen, including Davis, had used the party office for a steppingstone to statewide campaigns, Diamonstein has shunned such efforts.

"I have discussed that possibility over the past few years. It's not something I'm now considering," said Diamonstein. "But a politician never says never."