In the trench warfare over President Reagan's judicial nominees, the Democrats have picked targets carefully.

In taking aim at Jefferson Beauregard Sessions III, the U.S. attorney in Mobile, Ala., they knew they had a nominee who would be vulnerable to an assault on his civil rights record. Minutes after the Senate confirmation hearing began Thursday, it was clear the Democrats had scored a direct hit.

By the time he had explained why he once had called the NAACP "un-American" and "communist-inspired" or said the Ku Klux Klan was "okay," Sessions appeared so wounded that many in the Senate were saying he was likely to become the first Reagan judicial nominee to be defeated.

After five years as a back-burner issue, Reagan's effort to reshape the federal judiciary in a conservative mold has suddenly heated up in Congress. The stakes have always been high: half of the federal judiciary will be Reagan appointees by the end of 1988, and many will be handing down rulings well into the 21st century.

But only in recent months have Democrats decided to make the quality of Reagan's judges a full-blown political issue. They are mounting an all-out Senate floor fight, for example, against Texas state Judge Sidney A. Fitzwater, denouncing his role in posting questionable warning signs at minority polling places in Dallas in 1982.

A number of other nominees have also drawn criticism. One, Eric G. Bruggink, urged while serving on the state's textbook committee that such books as "The Diary of Anne Frank" and "A Doll's House" be banned from Alabama public schools. Another, Daniel A. Manion, sponsored legislation as an Indiana state senator to require that creationism be taught in the state's public schools along with evolution.

But Democrats, led by Edward M. Kennedy (Mass.), Joseph R. Biden Jr. (Del.), Howard M. Metzenbaum (Ohio) and Paul Simon (Ill.), have held fire on most of the nominees, in part because they do not want to seem to be blocking Reagan's choices solely on ideological grounds. Until recently, they focused on heading off the most extreme candidates before a formal nomination was made.

Civil rights groups "keep coming at us to go after every nomination," a Democratic Senate aide said. "Our theory is you have to beat a William Bradford Reynolds nomination once every six months, to prove you can still do it." Reynolds is the Justice Department civil rights chief who was denied a promotion by the Senate Judiciary Committee last year.

Democrats delayed action on Sessions' nomination last fall to gain time to dig into his background. Sessions was already a tempting target because he had unsuccessfully prosecuted Albert Turner, a former aide to the Rev. Martin Luther King Jr., on voting fraud charges last year. It was the first and most celebrated of a string of Justice Department cases that charged black civil rights activists in rural Alabama with ballot-tampering. Most ended in acquittals or mistrials and sparked charges of selective prosecution.

The Judiciary Committee's chief Democratic investigator, Reginald C. Govan, spent months visiting Mobile and interviewing more than 20 lawyers. Although Sessions, 38, is an experienced prosecutor, Democrats questioned why the American Bar Association had evaluated him as "qualified," its lowest positive rating, with a minority calling him "unqualified."

The trail eventually led back to Washington, where Democrats found two career attorneys in Reynolds' civil rights division who had worked with Sessions and been interviewed by the ABA. But the two, J. Gerald Hebert and Paul F. Hancock, declined to talk to the Democratic staff.

The Justice Department backed up their refusal to be interviewed until Biden threatened to try to block the confirmation hearing. The ranking Democrat, supported by a letter from Chairman Strom Thurmond (R-S.C.), won permission for his aides to take sworn statements from Hebert and Hancock and two other Justice lawyers the day before the hearing.

Hebert, a 13-year Justice Department veteran, was a reluctant witness, but that made his testimony all the more damaging. He said that Sessions had "a tendency to pop off," had made derogatory comments about the NAACP and American Civil Liberties Union and had agreed that a white civil rights lawyer was "a disgrace to his race."

Sessions, meanwhile, knew he was in trouble. Days before the hearing, he acknowledged to a Senate investigator that he had made the comment about the Klan. Asked if he had made any other controversial remarks, Sessions said, "I'm not going to hang myself." But Democrats had the noose ready Thursday afternoon. The emotional six-hour hearing began with Sen. Jeremiah Denton (R-Ala.), who pushed Sessions for both U.S. attorney and the district judgeship, accusing his detractors of "cheap, gutter politics."

Denton said critics who charged that Sessions was trying to intimidate black voters in Alabama to aid the senator's 1986 reelection campaign were attempting "to discredit me, to turn me out of office . . . by trying to turn me into a bigot, a racist, to portray me as the opposite of what I am."

In an impassioned speech in which he praised blacks for the economic resurgence of the South, Denton called the hearing "a circus" and said "it is the black people of Alabama who are going to be the most indignant about this farce."

Thurmond then took over the questioning for 90 minutes, politely asking Sessions about the allegations. But Sessions quickly compounded his difficulties, wondering aloud why he had made certain comments and expounding on his criticisms of civil rights groups.

The most dramatic moment came when Hebert, whose deposition had been quoted all day, walked into the hearing room and was invited to the witness table. Hebert said he had been through "a wrenching day," that he came because he considers Sessions a friend and knew his testimony had been damaging.

"I want Jeff to know . . . I didn't really intend for things to get to the point where they did," Hebert said. "But I had a duty to do what I did. I told the truth."

Hebert said he did not know whether Sessions was a racist, but that "some of the comments he's made showed a racial insensitivity."

The committee never got to a long list of opposition witnesses, including the Rev. Jesse L. Jackson, before it adjourned after 8 p.m. It has scheduled a second hearing Wednesday, and some think that Sessions may withdraw before then.

But committee sources say that Denton is determined to push for a vote, adding that Sessions is popular in Alabama and has been portrayed by the local news media as under siege by northern liberals. They said such a vote would be difficult for Alabama's other senator on the committee, Democrat Howell Heflin, and that several Republicans would also prefer to see the nomination die quietly.