For indispensable reporting on the coronavirus crisis, the election, and more, subscribe to the Mother Jones Daily newsletter.

Brett Talley had already been voted out of the Senate Judiciary Committee and was on his way to a lifetime appointment to the federal bench when reporters discovered what he’d written about the Klan. Since 2005, Talley, a 36-year-old lawyer nominated for a seat on the US District Court for the Middle District of Alabama, appeared to have posted more than 16,000 comments on University of Alabama sports message board TideFans.com. Writing as BamainBoston, he commented on everything from race to abortion. He disparaged Muslims, joked about statutory rape, and, most notably, wrote approvingly about Nathan Bedford Forrest, the first Grand Wizard of the Ku Klux Klan. He defended the “first KKK” as something entirely different than the racist, violent organization it’s known as today.

After outcry about the comments and his general lack of qualifications for the job—Talley had never tried a case—he withdrew from consideration for the judgeship in December. But the controversy didn’t send him packing to Alabama. Instead, he simply continued working as deputy associate attorney general at the Justice Department’s Office of Legal Policy, where he oversaw the judicial nominations unit that advises the president and attorney general on the selection and confirmation of federal judges and conducts the vetting, interviewing, and evaluating of nominees. This spring, he moved to a more junior position at the Justice Department, as an assistant US attorney.

President Donald Trump has submitted 95 judicial nominations since Talley withdrew his own; 22 of those nominees have been confirmed. Among the 95 nominees are controversial picks such as Wendy Vitter, wife of disgraced former Sen. David Vitter (R-La.) and a staunch anti-abortion activist, and Oregon prosecutor Ryan Bounds, who wrote a series of articles while at Stanford University mocking multiculturalism and advocating for leniency for alleged campus rapists. Talley headed the Justice Department unit that helped select and vet many of those nominees.

Liberal legal groups that monitor judicial nominations were surprised to hear that Talley continued working at the Justice Department after his confirmation debacle. “That Talley was in charge of picking nominees might explain why the quality has been so low and their views so extreme,” says Caroline Fredrickson, president of the nonprofit American Constitution Society. “He obviously thought of himself as a good candidate and helped pick others in the same mold.”

Even before Talley’s Klan defense posts became public, he had an unusual résumé for someone vying for a federal judgeship. Talley, who also writes horror novels, had been an amateur ghost hunter for a number of years in Alabama. After graduating from Harvard Law School in 2007, he practiced law for less than three years and never tried a case.

Groups that monitor judicial nominations were surprised to hear that Talley continued working at the Justice Department after his confirmation debacle.

Talley has spent most of his career in politics as a speechwriter, first for Mitt Romney’s presidential campaign in 2012 and then for Sen. Rob Portman (R-Ohio). He was a prolific opinion writer for CNN and conservative media sites. He also wrote his own blog, Government in Exile, where he promoted the National Rifle Association in the wake of the Newtown school shooting that killed 26 elementary school children and teachers. About a month after the shooting, Talley predicted on his blog that former President Barack Obama and congressional Democrats were about to use the school shooting to “launch the greatest attack on our constitutional freedoms in our lifetime.” He continued, writing, “Today I pledge my support to the NRA; financially, politically, and intellectually. I ask you to do the same. Join the NRA. They stand for all of us now, and I pray that in the coming battle for our rights, they will be victorious.”

Talley joined the Trump administration in January 2017 as a member of one of Trump’s “beachhead teams” at the Justice Department. These teams consisted of Trump loyalists placed at federal agencies in positions that didn’t require Senate confirmation, where they were intended to be the “eyes and ears” of the White House.

His beachhead role was a high-level one: deputy assistant attorney general at the Office of Legal Policy, where he had worked as a student during the administration of former President George W. Bush. In that role, he vetted candidates for the federal bench—until he became one of them in September. (In written questions during his confirmation process, Sen. Christopher Coons (D-Del.) asked Talley the obvious question: “Did you have any role in selecting yourself for this seat?” Talley said no.)

Talley’s nomination was championed by Alabama’s two Republican senators—including Luther Strange, for whom Talley worked for nearly two years when Strange was Alabama attorney general—but it was opposed by just about everyone else. The American Bar Association reviewed his credentials and unanimously found him “not qualified,” its lowest possible rating and one it had given out only twice since 1989 and before Talley. “This administration has prioritized the selection of individuals with extremist ideas, and the vetting focuses much more on an individual’s ideology than it does even with basic qualifications for the office,” says Nan Aron, president of the liberal judicial watchdog group Alliance for Justice.

Indeed, in his prolific comments on TideFans.com, Talley had not just posted about the Klan: He expressed extreme views on a number of subjects. For instance, he claimed that the Supreme Court decision in Miranda v. Arizona, which requires the police to inform people they arrest of their rights to remain silent and be represented by a lawyer, was “made up” by the court and should be overturned by the Supreme Court. He declared the Miranda decision, as well as Roe v. Wade, “indefensible.” In another post, Talley wrote it would be “awesome” if Alabama brought back the electric chair.

Talley also wrote on the site, “There’s no comparison between Christians and Muslims when it comes to terrorism. There’s just not. There are terrorists who are Christians, but there is no organized Christian terrorist movement. Today, in countries around the world, the mainstream, dominant sect of Islam preaches the worldwide caliphate and the murder of nonbelievers.” During the Republican presidential primaries, Talley wrote that Trump was popular because he “says what everyone is thinking about Islam but doesn’t want to say.”

More than 40 Muslim civil rights and other faith-based groups wrote to the Senate Judiciary Committee to oppose his nomination.

Talley did not share his online comments with the committee as part of his required disclosures. The final nail in the coffin for his judicial aspirations, though, was his failure to apprise the committee of a potential conflict of interest: his wife.

Talley is married to Ann Donaldson, chief of staff to the White House counsel, Donald F. McGahn II, who has played a critical role in Trump’s judicial nominations. According to the New York Times, Donaldson is also a witness in special counsel Robert Mueller’s investigation into whether Trump obstructed justice by trying to prevent the Justice Department from investigating Russian meddling in the 2016 election. Federal courts frequently handle lawsuits against the White House, making Talley’s omission a fatal one.

A month later, Talley withdrew his nomination—and went right back to the Office of Legal Policy. He worked there until just a few weeks ago.

In May, Talley made an unusual career move. Though he had virtually no experience handling criminal cases, he is now working as an assistant US attorney in the Eastern District of Virginia, prosecuting low-level immigration and drug cases. It’s just the kind of entry-level federal position someone aspiring to be a judge someday might angle for. A Justice Department spokesperson wouldn’t say why he made the job change, and Talley didn’t respond to a request for comment.

“To think they wanted to make this guy a federal judge,” says Aron.