The famously mild-mannered Sen. Jeff Sessions (R-Ala.) was as calm and collected as ever, but he was also deeply bothered.

It was midsummer 2009, and Sessions, then the ranking Republican of the Senate Judiciary Committee, had sat down for a hearing to question President Obama’s first nominee to the Supreme Court, Sonia Sotomayor, who was also the first court nominee of Latino heritage.

She had a sterling resume, summa cum laude from Princeton, editor of the Yale Law Journal, prosecutor and federal judge. But Republican lawmakers took issue with some past remarks she made reflecting on how her ethnicity (she’s of Puerto Rican descent) and background had shaped her views. In several speeches, Sotomayor had suggested that a “wise Latina woman” might reach a better conclusion in a case than a white man, and said a judge’s “experience and heritage” might play a role in the courtroom as well.

Despite Sotomayor’s attempts to put the remarks in context, her critics used it against her to suggest that she would allow race to cloud her decisions.

Sessions became fixated on the “wise Latina” comment over several days of confirmation hearings, grilling her about the language and questioning her ability to be impartial as a judge.

“You have evidenced,” Sessions told her at one point, “a philosophy of the law that suggests that a judge’s background and experiences can and should — even should and naturally will — impact their decision, which I think goes against the American ideal and oath that a judge takes to be fair to every party.”

Fast forward seven and a half years, and Sessions is now in the hot seat, defending his record as a lawyer and a lawmaker against accusations of racial insensitivity as he seeks confirmation as President-elect Donald Trump’s attorney general.

In hearings Tuesday and Wednesday, Sessions sought to head off critics who say he has a history of crude comments about race and a weak track record on civil rights — claims that have dogged him throughout his career.

“I hope my tenure in this body,” he told the Judiciary Committee, “has shown you that the caricature that was created of me was not accurate.”

Before becoming a senator, Sessions served as a federal prosecutor in Alabama and later the state’s attorney general. In 1986, he was rejected from a federal judgeship by the same committee he went on to lead over questions about racial prejudice and his failed prosecution of three black civil rights activists in a voter fraud case the year before. At the time, his former deputy, Thomas Figures, said Sessions told him to be careful about what he said “to white folks” and called him “boy” on multiple occasions. Figures, who is black, also said Sessions once joked that he thought the Ku Klux Klan was “okay, until he learned that they smoked marijuana.” Sessions was also accused at the time of calling the NAACP “un-American.”

Those allegations resurfaced this week, along with concerns about his record on criminal justice reform and voting rights. Responding to his critics, Sessions, who is expected to win confirmation, cited his efforts in Alabama to integrate schools, prosecute the Ku Klux Klan and end racial gerrymandering.

“I conducted myself honorably and properly,” he said. “I did not harbor the kind of animosity and race-based discrimination ideas that I was accused of.”

The harshest rebukes of Sessions came from witnesses in Wednesday’s hearing, though he had numerous defenders. Sen. Cory Booker (D-N.J.) broke with Senate tradition to testify against him, saying Sessions wouldn’t seek justice as the nation’s top law enforcement officer. Rep. John Lewis (D-Ga.), a leader in the civil rights movement, more explicitly homed in on race, saying a Sessions confirmation threatened to undo racial progress in the United States.

The country needs “someone who’s going to stand up, speak up and speak out for the people that need help, the people who have been discriminated against,” Lewis testified.

You might say Sessions was getting a taste of his own medicine.

When Obama nominated Sotomayor to replace Justice David Souter on the Supreme Court in 2009, her “wise Latina” remarks quickly became a focal point. Sessions and others objected to two sentences in particular.

In a speech delivered to law students in 2001, Sotomayor said: “I would hope that a wise Latina woman with the richness of her experiences would more often than not reach a better conclusion than a white male who hasn’t lived that life.”

In the same speech, versions of which she delivered elsewhere over several years, she continued: “I willingly accept that we who judge must not deny the differences resulting from experience and heritage but attempt, as the Supreme Court suggests, continuously to judge when those opinions, sympathies and prejudices are appropriate.”

In Sotomayor’s confirmation hearing, Sessions devoted much of his opening statement to the remarks, portraying the vote for or against her as a crossroads between the “traditional American system” and a “Brave New World where words have no true meaning and judges are free to decide what facts they choose to see.”

“In this world, a judge is free to push his or her own political or social agenda,” he said. “I reject that view, and Americans reject that view.”

Throughout the proceedings, Sessions was generally soft-spoken and polite, but his criticisms were barbed. Over a half-hour, he repeatedly challenged Sotomayor on the meaning behind her “wise Latina” and “experience and heritage” comments. He also questioned her decision in an appellate case in which she sided with a city government that had thrown out a firefighter promotion test because few minorities scored well on it.

“Do you stand by your statement that ‘’my experiences affect the facts I choose to see’? ” Sessions asked her at one point.

Sotomayor responded: “No, sir. I don’t stand by the understanding of that statement that I will ignore other facts or other experiences because I haven’t had them. I do believe that life experiences are important to the process of judging; they help you to understand and listen, but that the law requires a result, and it will command you to the facts that are relevant to the disposition of the case.”

Sotomayor tried to defuse concerns over her remarks, saying they were “rhetorical flourish that fell flat” and that her intent was to inspire young Latino law students. She said she was trying to draw a parallel to former Supreme Court Justice Sandra Day O’Connor, the first woman on the court, whom she quoted in her speeches as saying “a wise old man and wise old woman will reach the same conclusion in deciding cases.”

“It was bad, because it left an impression that I believed that life experiences commanded a result in a case,” Sotomayor testified. “But that’s clearly not what I do as a judge.”

Still, Sessions pressed.

“As a judge who has taken this oath,” he said, “I am very troubled that you would repeatedly over a decade or more make statements that consistently — any fair reading of these speeches consistently argues that this ideal and commitment — I believe every judge is committed, must be, to put aside their personal experiences and biases and make sure that that person before them gets a fair day in court.”

Sessions urged his colleagues not to vote for a nominee who “believes it is acceptable for a judge to allow their personal background, gender, prejudices, or sympathies to sway their decision in favor of, or against, parties before the court. In my view, such a philosophy is disqualifying.”

In the end, Sessions was among 31 senators who voted against her. But he had positive words about the proceedings.

“We had a more honest discussion of some of the complexities and sensitivities of the race question in this hearing than in the 12 years I have been in the Senate,” he said at the time.

It’s not clear whether his own confirmation vote will bring out the same response.

More from Morning Mix: