U.S. Sen. Cory Booker of New  Jersey broke with congressional tradition Wednesday and testified against a fellow senator being considered for a Cabinet post.

Booker spoke out against U.S. Sen. Jeff Sessions, President-elect Donald Trump's nominee for U.S attorney general.

Long a champion of criminal justice reform, Democrat Booker said the next attorney general ought to continue bringing positive changes to the country's police departments and courtrooms. Booker said that task "demands a more courageous empathy than Sen. Sessions' record demonstrates."

Historians said it was rare for a sitting senator to testify against a fellow sitting senator during a confirmation hearing.

The former Newark mayor also blasted the Alabama Republican's record on women's rights, LGBT rights, immigrant rights, and voting rights.

Early in his testimony, Booker recounted a personal story of how a white New Jersey judge, inspired by the Civil Rights movement, defended black New Jersey families who were denied housing.

Booker said one of those families was his. "I am literally sitting here because of people — marchers in Alabama and volunteer lawyers in New Jersey — who saw it as their affirmative duty to pursue justice, to fight discrimination, to stand up for those who are marginalized.

"But the march for justice in our country still continues," he said. "It is still urgent."

Sessions was both a federal prosecutor and an Alabama attorney general before his election to the Senate.

Ross Baker, a political science professor at Rutgers University, applauded Booker for bucking tradition and standing on principle.

"He's someone who really devoutly believe in civil rights. He's someone who's fought very hard to reform the criminal justice system, particularly sentencing procedures," Baker said. "There are many areas of the attorney general's jurisdiction that impinge on things Cory Booker cares about."

But Baker added that there is room to be cynical about the testimony given by Booker, who is known to have national political ambitions.

"If Sen. Booker were interested in 2020 Democratic [presidential] nomination, it certainly would not hurt him to present himself to the Democratic electorate as the one senator who proudly and vocally stood up to what he considered to be an appointment, which was — from a civil rights point of view, from a liberal point of view — not a good choice," said Baker.

Sessions nomination will now go before the full U.S. Senate for a vote.

With the support of Senate Republicans as well as some Democrats in right-leaning states, he is expected to be approved.