FOUR MONTHS AGO the Commonwealth of Virginia and the Department of Health, Education and Welfare were locked in a bitter, seemingly intractable skirmish over further desegregating the state's university system. Two previous plans drafted by the state for eliminating the vestiges of the old segregated system had been rejected by the federal agency, putting in jeopardy the nearly $75 million Virginia received in federal aid to higher education. The dispute seemed destined to be decided by a federal court. Last week, however, it suddenly dissipated. HEW Secretary Joseph Califano accepted and praised a new desegregation plan state officials had worked out, a plan that closely followed HEW's original suggestions. What in just a few months made the difference? Virginia's new governor, John N. Dalton.

As Mr. Califano said in announcing the agreement, Gov. Dalton's work in the issue was forthright and positive. There's no denying the problem's complexity: how to promote racial diversity throughout the university system without requiring illegal quotas or abridging students' or institutions' rights - especially since the lack of diversity results from past, not current, discriminatory practices. HEW, itself under threat of a federal court order and operating on the theory that a locally produced plan would be more politically acceptable, had directed Virginia (and five other states) to draft a plan following its guidelines. (The plans of four other states have also been approved.)

Former governor Mills E. Godwin refused to comply, preferring instead to speak against the HEW guidelines in a manner that left no room for negotiation. Fortunately, Mr. Dalton, who in the past generally supported Mr. Godwin on this issue, made clear his desire for negotiation instead of confrontation immediately upon taking office. True, at one point he half-heartedly explored whether the state legislature was prepared to fight HEW in court. (It clearly wasn't.) Just why he did so isn't clear. In any case, he soon changed that tack and continued on course toward a settlement.

Now comes the difficult part: carrying out the plan. Basically, it calls for increasing the number of black students in the system as a whole and at individual colleges, attracting more white students and faculty to the state's predominantly black colleges, and bolstering the academic programs of the predominantly black colleges. Mr. Dalton's having lined up important support for the plan among both politicians and educators should help smooth its acceptance considerably. (And, as we've said before, HEW can help the plan's chances for success by keeping in mind its pledge to be flexible about the state's reaching its desegregation goals.) Despite the ease with which HEW and Virginia agreed to the plan, making it work is going to be hard work. But Gov. Dalton deserves credit for the leadership he's shown in moving Virginia this far in such a short time.