Sen. Jeff Sessions, President-elect Donald Trump's nominee for attorney general, said Tuesday he would recuse himself from any prosecution of Hillary Clinton related to her private email server use or possible illegalities tied to the Clinton Foundation.

Senate Judiciary Committee Chairman Chuck Grassley raised the issue by asking Sessions, who campaigned for Trump, about comments he made during the campaign.

Sessions testified that it was a contentious campaign and the best move would be for him to enlist a special prosecutor to handle any further investigations into Clinton.

"I believe the proper thing for me to do would be to recuse myself from any questions involving those kind of investigations that involve Secretary Clinton that were raised during the campaign," Sessions testified.

"We can never have a political dispute turn into a criminal dispute," Sessions said. "This country does not punish its political enemies, but this country ensures that no one is above the law."

Sessions was asked if at any point during the presidential campaign he joined the chant, "Lock her up" regarding Clinton.

"No, I did not. I don't think," Sessions said.

Sessions also said he would be able to say no to his boss, Trump, who during the campaign — in fact a debate — said he would instruct his AG to investigate Clinton.

"And I will do so," Sessions said. "You simply have to help the president do things that he might desire in a lawful way and have to be able to say no both for the country, for the legal system and for the president to avoid situations that are not acceptable. I understand that duty … and I will fulfill that responsibility."

To wit: Sessions would not support a ban on Muslims, a notion brought up by Trump during the campaign but one from which he later backed away.

"I do not support the idea that Muslims should be denied entry to the United States," Sessions said.

Sessions also spent a lot of time rejecting decades-old charges of racism, both in his statement and during questioning.

Long one of the Senate's more conservative members, Sessions directly rebutted a key criticism of his opponents: that he has a history of racist comments and would undermine provisions created to protect voting rights for minorities.

A decade before joining the Senate, Sessions had his nomination for a federal judgeship scuttled when character witnesses said he had made racist comments.

"I deeply understand the history of civil rights in our country and the horrendous impact that relentless and systemic discrimination and the denial of voting rights has had on our African-American brothers and sisters. I have witnessed it," Sessions said in his opening statement.

"We must continue to move forward and never back. I understand the demands for justice and fairness made by our LGBT community. I will ensure that the statutes protecting their civil rights and their safety are fully enforced. I understand the life-long scars born by women who are victims of assault and abuse," Sessions said.

Sessions also testified that he supports federal gun laws.

"My best judgment, colleagues, is that properly enforced, the federal gun laws can reduce crime and violence in our cities and communities," Sessions testified. "The culture, the communities are safer with fewer guns in the hands of criminals."

Sessions said he supports the continued operation of Guantanamo Bay as a prison for the world's most dangerous terrorists and international criminals.

Sessions endured multiple outbursts from protesters targeting his involvement in prosecuting three black men in Alabama in 1986 in a voter fraud case and his alleged sympathies to the Ku Klux Klan.

"The voter fraud case, my office prosecuted was in response to pleas from African-Americans incumbent elected officials who claimed the absentee ballot process involved a situation in which ballots cast for them were stolen, altered and cast for their opponents.

"The prosecution sought to protect the integrity of the ballots, not to block voting. It was a voting rights case," Sessions said in his opening statement.

He cited another case of his prosecution of a Klansman that led to the death penalty, and also assured he would be an active advocate for minorities as attorney general.

Amid brief interruptions of protesters at the opening of the hearing, members of the Senate Judiciary Committee on Tuesday introduced the plans of attack and defense of Sessions.

Grassley, Sens. Richard Shelby and Susan Collins presented Sessions as a longstanding and upstanding man of integrity who would dutifully uphold the law.

Collins, as she began her remarks lauding Sessions and defending him against unfounded charges over the years, was briefly interrupted by a protestor.

Another protestor in a chant against the KKK, a charge linked to the Alabama senator, interrupted Sessions' remarks for nearly a minute, audibly struggling as he was removed from the proceedings.

Sen. Dianne Feinstein, D-Calif., ranking member of the Judiciary Committee, however, voiced many concerns she has for Sessions.

Bringing up Trump's remarks during one of the debates to have his attorney general investigate Hillary Clinton, Feinstein said despite her private support of Sessions, his candidacy needs to be vetted carefully.

"Mr. Chairman, that's not what an attorney general does," Feinstein said. "An attorney general does not investigate or prosecute at the direction of the president. Nor do attorneys general wear two hats.

"One as the president's lawyer and one as the president's — as the people's lawyer. That model has failed. Rather, the attorney general must put aside loyalty to the president and assure that the law and the Constitution come first and foremost, period."

Feinstein also said Sessions must ensure that this country never enlists torture tactics again.

This report contains material from Bloomberg News.