Joe Biden is having to defend his record on civil rights because of something he said, and he picked a heck of a week to step into the type of controversy that presidential candidates never want to court.

Supporting civil rights is as basic as it gets for a Democratic presidential candidate trying to unseat President Trump, a president they’ve all argued has allowed white supremacy to fester. Biden has made Trump’s remarks on a deadly rally involving white nationalists in Charlottesville a central component of his campaign.

And yet, the former vice president opened himself up to criticism of his own record at a fundraiser Tuesday when he brought up his congeniality with two of the most notorious senators in the civil rights era to argue that he can work together with anybody.

The point was inartfully made, even some of his supporters acknowledge. (And Biden does have powerful supporters in Congress, including the highest-ranking African American in Congress, Democratic Rep. James E. Clyburn of South Carolina.)

But the fact that Biden both worked with and befriended people like then-Sen. James O. Eastland of Mississippi — who has said the black race is inferior to the white one — quickly overshadowed what Biden was trying to say about his track record on bringing opposing sides together.

The next thing Biden knew, his 2020 rivals, most notably those with African American heritage, were launching punches at him.

To underscore his congeniality with Eastland, Biden had told potential donors: “He never called me ‘boy.’ He always called me ‘son.' ” Sen. Cory Booker (D-N.J.), responded: “You don’t joke about calling black men ‘boys.' Men like James O. Eastland used words like that, and the racist policies that accompanied them, to perpetuate white supremacy and strip black Americans of our very humanity.”

“If those men had their way, I wouldn’t be in the United States Senate and on this elevator right now,” Sen. Kamala D. Harris (D-Calif.) told reporters.

Letters between Biden and Eastland archived at the University of Mississippi then gained new prominence. It was the 1970s, and Biden opposed court-mandated busing of black students to whiter schools and vice versa. “I want you to know that I very much appreciate your help during this week’s Committee meeting in attempting to bring my antibusing legislation to a vote,” Biden wrote on June 30, 1977, to Eastland, according to The Washington Post.

Biden’s opposition to busing in the 1970s isn’t a new revelation. The Post’s Matt Viser highlighted it before Biden officially got into the race, warning that it could become an issue. (“I’ll be damned if I feel responsible to pay for what happened 300 years ago,” Biden said at the time.)

But his 2020 opponents didn’t have to go to Mississippi and dig up the letters or find some sly way to bring them up into conversation. Biden opened the door to all of this.

It’s a fact that worries Democratic strategists to whom I’ve talked. They say this is Biden’s race to lose and that his bumpy campaign skills aren’t helping him. On issues that are absolutely critical to today’s Democratic Party — federal funding for abortion, aspects of the #MeToo movement, criminal justice reform — Biden has underscored how his views are out of step with this generation.

The timing of the segregationist flap was perfectly wrong for Biden. It’s a week before the first Democratic primary debates, when many candidates will want to attack Biden to see if they can lower his standing at the top of the polls. That may have contributed to Booker and Harris directly confronting Biden on this. Up until now, they and other candidates have tried to diplomatically disagree with him rather than attack him.

This weekend, Biden and the other 2020 candidates will be courting black voters in the early-voting state of South Carolina at Clyburn’s annual fish fry.

Instead of highlighting his closeness with the first African American president and his work with African American leaders like Clyburn going into this critical week, Biden’s campaign is having to issue statements like this: “The insinuation that Joe Biden shared the same views as Eastland on segregation is a lie. Plain and simple. Joe Biden has dedicated his career to fighting for civil rights.”

Biden is popular among black voters, writes The Fix’s Eugene Scott, and it’s too early to tell whether this will damage him. But defending his record on civil rights is certainly the last thing he wanted to be doing right now. And for that, he has no one to blame but himself.