Alabama Senator Jeff Sessions fervently rejected "damnably false" accusations of past racist comments Tuesday as he challenged Democratic concerns about the civil rights commitment he would bring as Donald Trump's attorney general.

He vowed at his confirmation hearing to stay independent from the White House and stand up to Trump when necessary.

Sessions laid out a sharply conservative vision for the Justice Department, pledging to crack down on illegal immigration, gun violence and the "scourge of radical Islamic terrorism."

But he also distanced himself from some of Trump's public pronouncements.

He said waterboarding, a now-banned interrogation technique that Trump has at times expressed support for, was "absolutely improper and illegal."

Though he said he would prosecute immigrants who repeatedly enter the country illegally and criticized as constitutionally "questionable" an executive action by President Barack Obama that shielded certain immigrants from deportation, he said he did "not support the idea that Muslims, as a religious group, should be denied admission to the United States."

Trump earlier in his campaign called for a temporary ban on Muslims entering his country, but has more recently proposed "extreme vetting."

Police remove men without further incident 0:36

Sessions asserted that he could confront Trump if needed, saying an attorney general must be prepared to resign if asked to do something "unlawful or unconstitutional."

Nothing new came out of the hearing that is likely to threaten Sessions' confirmation by the Republican Senate.

Yet his past, including a 1986 judicial nomination that failed amid allegations that he'd made racially charged comments, hovered over the proceedings. Protesters calling Sessions a racist repeatedly interrupted and were hustled out by police.

Protesters from CodePink take part in a demonstration during the Senate judiciary committee's confirmation hearing for attorney general-designate Jeff Sessions. (Andrew Harnik/Associated Press)

Sessions vigorously denied that he had ever called the NAACP "un-American." He said he had never harboured racial animus, calling the allegations — which included that he had referred to a black attorney in his office as "boy" — part of a false caricature.

Trump A.G. nominee shocks committee with statement 1:53

"It wasn't accurate then," Sessions said. "It isn't accurate now.

"I know we need to do better, we can never go back," he said. "I am totally committed to maintaining the freedom and equality that this country has to provide to every citizen, I can assure you."

He said he "understands the history of civil rights 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."

Politics got its share of attention, too, with Sessions promising to recuse himself from any investigation there might be into Democrat Hillary Clinton, whom he had criticized during the presidential campaign.

Trump said during the campaign he would name a special prosecutor to look into Clinton's use of a private email server, but he has since backed away from that statement. The FBI and Justice Department declined to bring charges last year.

Sessions, known as one of the most staunchly conservative members of the Senate, smiled amiably as he began his presentation, taking time to introduce his grandchildren, joking about Alabama football and making self-deprecating remarks about his strong Southern accent.

He has solid support from the Senate's Republican majority and from some Democrats in conservative-leaning states.

But he faces a challenge persuading skeptical Democrats that he'll be fair and committed to civil rights, a chief priority of the Justice Department during the Obama administration, as the country's top law enforcement official.

Democratic Senator Dianne Feinstein asked whether he could be trusted to enforce the laws he has voted against, including expanded hate crime protections. He said he could, noting that he accepted the Roe v. Wade opinion on abortion as the law of the land even though he personally opposed it.

Opposing testimony

In a dramatic turn, Senate colleague Cory Booker of New Jersey — one of three black senators — is to testify against Sessions on Wednesday. Booker's office said it will be an unprecedented instance of a senator testifying against a colleague seeking a cabinet post.

In a statement, Booker accused Sessions of having a "concerning" record on civil rights and criminal justice reform.

Meanwhile, Trump's choice to lead the Department of Homeland Security supports a wall to secure the border with Mexico, but said Tuesday that such a structure alone won't be enough.

"A physical barrier in and of itself will not do the job," retired marine general John Kelly told members of the Senate homeland security and governmental affairs committee during a confirmation hearing. "Certainly it has to be a layered approach."

Kelly said in a lengthy questionnaire to senators that if confirmed as the fifth Department of Homeland Security secretary his top priority would be stopping the "illegal movement of people and things."

Answering questions about his plans to secure the border, stop the flow of drugs and curb illegal border crossings, Kelly told lawmakers border security shouldn't only focus on the frontier with Mexico, but "1,500 miles south" in Central America.

Kelly's confirmation is almost assured — a reality expressed by both Republican and Democratic senators Tuesday — but members of the committee nonetheless pressed him to specify his stances on immigration enforcement, border security and some of Trump's more controversial suggestions during the campaign, including the possibility of a registration system for Muslim immigrants.

Kelly told lawmakers he doesn't support any registration of people in the United States based on ethnicity or religion.

He also said he accepts with "high confidence" reports from the intelligence community that Russia tried to influence the 2016 presidential election.