It began with a handwritten "Dear Harry" note from President Carter to Virginia's senior senator, asking him to convene a citizens' panel to recommend nominees for the federal bench. It is ending, three years later, with a defeat for the White House, a major setback for those who sought to put a black on Virginia's traditionally all-white judiciary and perhaps with a permanent cloud over the career and reputation of the state's highest ranking black jurist.

Although the denouncement, is still uncertain, almost everyone involved agrees that the controversial effort to name James E. Sheffield as Virginia's first black federal judge has been a fiasco -- one for which many blame the Carter administration. Lt. Gov. Charles S. Robb, who was burned when he attempted to mediate the dispute, said it was "Regrettably . . . mishandled from start to finish."

A White House source concurs.The "Dear Harry" letter to Sen. Harry F. Byrd Jr. (Ind-Va.) "simply was a mistake on our part. It happened fairly early in the administrators and we just hadn't done our homework," the Carter aide acknowledged.

While Sheffield's supporters and other Virginia Democrats give Jimmy Carter and his people credit for good intentions, they contend the administration made a series of crucial errors that has virtually doomed Sheffield's nomination and given victory to Byrd and the white conservatives who are his political constituency.

Others contend that Sheffield, who aparently underestimated the seriousness of questions concerning his own finances, and that Robb, the ranking Democratic officeholder in Virginia, must share the blame for what became -- except for the seriousness of the issue -- a comedy of errors.

Technically Sheffield's nomination is alive, awaiting action by the Senate Judiciary Committee, but he faces several formidable obstacles to confirmation.

Among these are Byrd's opposition, which the senator -- a proponent of Virginia's massive resistance to school desegregation in the 1950s -- insists is unrelated to racial considerations, and questions about whether Sheffield violated legal or ethical standards in his handling of clients' money before he went on the state bench.

A third obstacle is time. The Senate may recess at the end of this week for the November elections, and if Carter should lose his reelection bid, the Sheffield nomination almost certainly would die, regardless of its merits. If Carter is reelected, a new Congress could consider Sheffield, although it would require the president to begin the nomination process anew.

"Carter's first mistake, according to critics, was in giving Byrd the initiative in choosing the nominees. Although he is an independent, Byrd remains a member of the Senate's Democratic caucus, voting with the majority on organizational issues and in return retaining his seat as a Democrat on key committees.

"The letter to Byrd was a major error," says Chad Kendrick, head of the Virginia chapter of the American Civil Liberties Union. "Anybody who knew Harry Byrd knew what would happen."

The idea -- from Carter's 1976 campaign -- was to take strictly partisan politics out of the selection of judgeships and with the creation of 152 new judgeships across the country, open the way for merit selections, with particular emphasis on locating minorities and women for elevation to the federal bench. To make that happen, the president wrote to the senior State Democrat in each state delegation, including Byrd on the list -- and asked them to appoint a citizens panel for each judicial vacancy in their state to come up with a list of possible nominees.

Byrd, who had been frozen out of the judicial selection process since the waning days of the Lyndon Johnson administration, seized on the White House suggestion, and created selection panels for the state's two judicial districts. The panels came up with the names of 10 potential nominees -- all of them white males.

The list was unacceptable to Carter. In a move that shocked Byrd, he publicly threatened to leave all four vacancies unfilled unless Byrd agreed to add new names to the list.

That threat, too, was a mistake, according to Robb, who said the statement appeared to be a slap at Byrd's integrity, and made Byrd more determined to stick to his list. Robb, the Democrats' likely candidate for governor in 1981 and one of the few members of the Virginia party with close ties to the White House, attempted to intervene. He tried to explain the problem to presidential adviser Hamilton Jordan and then-attorney general Griffin Bell, at a meeting in Jordan's office in the fall of 1978.

The president dispatched the attorney general to Byrd's office in the Russell Building on Capitol Hill, a visit that Byrd recalls as "a pleasant conversation in which I told bell I had done everything the president had asked of me."

Robb said he then attempted to work out a compromise in which one of the state's senior federal judges would retire, opening up a fifth vacancy that a black might fill. Another idea was for the president to nominate a black to one of the four new seats, while pledging to fill the fifth with a name from Byrd's list.

Those efforts hit a snag when Robb revealed pubicly what he already had told the president's men in private; that he supported the president's commitment to affirmative action, but he felt that Carter had no choice other than to honor Byrd's list for the four vacancies.

That statement provoked an outcry from the state's black community, whose support Robb will need in his expected campaign for governor next year. Robb's influence was further diluted when a Carter aide leaked word that Robb had contacted Richmond Mayor Henry Marsh, a black lawyer, at the White House's behest, to test Marshs' interest in a judgeship. That leak finished Robb's credibility on the issue, and, as he later put it, left him politically "skewered and barbecued."

L. Douglas Wilder (D-Richmond), Virginia's only black senator, blames Robb in part for the debacle. "Robb sort of helped set this thing in concrete when he indicated he supported Harry Byrd. Chuck wasn't totally blind."

While the White House and Byrd parried, Virginia's black leaders were searching for a candidate to rally behind. The obvious choice was Richmond Circuit Court Judge Jim Sheffield, a low-key man with few enemies who possessed what is known as legal circles as "judicial temperament."

Sheffield's confidantes were aware that he once had been delinquent in paying $1,071 in local real estate taxes and that he had had an unspecified dispute with the Internal Revenue Service that supposedly had been resolved. dBut they were assured by the judge and his advisers that none of this would stand in the way of his confirmation.

In August 1979, the White House leaked word that Sheffield would be Carter's fourth nominee, having earlier selected three men from Byrd's list for the other slots. Eight months went by before the nomination was announced officially. In the interim, the White House apparently was trying what was by then impossible -- a compromise with an angry and adamant Byrd.

When the nomination finally came through, it was too close to the Senate's summer recess for the Judiciary Committee to begin hearings. As the nomination languished last summer, Republican staff members sympathetic to Byrd -- and sensing the possibility of a Republican in the White House next year -- began leaking dark, vague charges that something was wrong with Sheffield's finances, and that he would never reach confirmation.

A White House source said that, given Byrd's opposition and the racial polarization that resulted, "this nomination would have been difficult no matter what the background of the nominee. In retrospect, there are things we could have done differently, but we knew it would be a fight and the president was prepared to make the effort because he thought it was important." p

One Capitol Hill observer believes, however, that in the obsence of accusations about Sheffield's finances, Byrd would not have been able to muster enough votes on the Judiciary Committee to block the nomination. Civil rights lobbyist were busy contacting organizations in the home states of committee members in behalf of many minority nominees.

"No one wants to be perceived as a racist," the observer noted, and given the rather liberal makeup of the committee and the outspoken commitment of its chairman, Sen. Edward M. Kennedy (D-Mass.), the Sheffield nomination might have been approved with or without the support of his home state's senior senator.

The eight-month wait between the leaked report that Sheffield was Carter's choice and the actual nomination was attributed to a desire by Justice Department investigators "to make sure the nomination wouldn't be open to criticism," according to one source in the administration.

But the report that finally was sent to Congress from Justice was slipshod, according to several sources. Investigators for the Republican minority on the committee quickly seized on the three investigations of Sheffield's tax returns by IRS, and shortly thereafter came up with allegations that Justice investigators apparently either didn't follow up on, or didn't discover.

The Justice Department declined to comment, citing a policy that prohibits discussion of pending nominations.

The litany of mistakes reached a peak last month when, less than 24 hours before he was to appear before the committee, Sheffield met with Philip H. Modlin, assistant to the attorney general, and was told that the committee had been given a damaging IRS report on the judge's finances. Modlin held a copy of the damning report in his hand, but told Sheffield it was against the law for him to allow the judge to read it.

The next day, Tuesday, August 26, dozens of Sheffield's supporters drove more than 100 miles to the Capitol, only to hear Sheffield abruptly ask for a halt to the hearings as Sen. Orrin G. Hatch (R-Utah) began broaching material in the IRS file.

Still unanswered is why the judge made no attempt to find out the contents of the report before the hearing -- or why he didn't ask for a delay and save his friends the embarrassment of the trip from Richmond.

Earlier this month leaked information resulted in reports that the IRS files contained statements by the judge that he had commingled clients' funds -- mixed their money with his in violation of legal ethics. The judge has denied that, and one person who has studied the IRS file said that it says not that the judge commingled funds, but rather that he mingled clients' money. The distinction, according to this source, is that mingling funds, placing money from more than one client in the same escrow account, is not only ethical, but common practice, while commingling is so grave a breach of the canons of ethics that it could result in disbarment.

But another person who has studied the file insists that it indicates that Sheffield volunteered the information that he had commingled funds, as a defense against possible criminal charges of income tax evasion.

Sheffield, who finally got to see the IRS report several days after he walked out of the confirmation hearing, asserts that a full-blown examination of the record will prove that he did nothing wrong, legally or morally, although he acknowledges that the report is ambiguous.

Sheffield has charged that the leaked information is part of a smear campaign to destroy his reputation and squeeze him into withdrawing his nomination. His supporters are more direct, saying -- while admitting they can't prove it -- that Byrd and his allies are behind the leaks.

Byrd denies that.

Sheffield's friends say he plans to pursue the nomination, even though many of them believe he has little or no chance of winning confirmation. One source said that Sheffield has drawn up a letter of withdrawal -- although the judge denies it -- but that he wants to get a hearing to clear his name, and preserve his seat on the state bench.

While many of Sheffield's supporters blame the Carter administration for botching the nomination, they still plan to support the president this November because they see little alternative.

"Let's not kid ourselves," says state Sen. Wilder, "if Carter is not reelected, it sets us tremendously far back because I don't think you'll see Ronald Reagan nominating a black federal judge here. On the other hand, if the president is reelected, it would be in his interest and I think in his conscience to nominate a black,"

Others are not as optimistic.

"There's no guarantee the appointment will go to a black," says Del. Robert C. Scott (D-Newport News), one of four blacks in Virginia's 100-member House of Delegates. "It's a lot easier when you've got four vacancies than when you've got only one."