Former Vice President Joseph R. Biden Jr.’s presidential campaign was forced into a defensive posture this week after he invoked his work with Southern segregationist senators to make a point about bygone comity in Congress. The backlash has posed an early and important stress test on Mr. Biden’s hold on a constituency that has helped elevate him to his front-runner perch in the polls: African-Americans.

Mr. Biden’s nostalgic recollections of working with senators with whom he vehemently disagreed — “at least there was some civility,” Mr. Biden recalled — stirred immediate condemnation from his rivals on Wednesday, including the two black candidates in the 2020 race. Senators Kamala Harris and Cory Booker both questioned Mr. Biden’s grasp on the painful history of segregation, and Mr. Booker called on him to apologize.

The former vice president struck back. “Apologize for what,” he said outside a fund-raiser on Wednesday night, in turn calling for Mr. Booker to apologize.

The episode was the most frontal confrontation yet of the presidential primary for Mr. Biden. It came one week out from the first debate and ahead of this weekend’s high-profile gathering of candidates in South Carolina, a state where black voters make up a large segment of the Democratic electorate. Most of the 2020 field — including Mr. Biden, Mr. Booker and Ms. Harris — will attend an annual fish fry on Friday hosted by the highest-ranking African-American in Congress, Representative James E. Clyburn, and then the South Carolina Democratic Party’s convention over the weekend.