Alabama Senator Jeff Sessions, who has echoed the president-elect's calls for "law and order," said he would stand up to the president when necessary.
The US President-elect Donald Trump's pick for attorney general, Jeff Sessions, promised on Tuesday to stand up to Trump, his close ally and future boss, saying he would oppose a ban on Muslims entering the country.
He also said he would enforce a law banning water boarding, a form of torture, although he has supported water boarding as a senator.
Questioned for 10 1/2 hours by a US Senate Judiciary Committee responsible for confirming his appointment, Sessions, a US senator from Alabama vowed to stay independent from the White House and stand up to Trump when necessary.
With ten days to go before Trump takes office, Sessions, 70, was the first Cabinet nominee to face questioning. He appeared before the Senate Judiciary Committee.
Sessions has come under fire for his support of hard-line immigration policies, which were proposed by Trump. Earlier in his election campaign, Trump called for a complete ban on foreign Muslims from entering the US, after a mass shooting carried out by a Muslim couple in California in November 2015.
Democratic Senator Dianne Feinstein said the Senate Judiciary Committee had received letters from 400 civil rights organisations opposing his confirmation to the country's top law enforcement post.
He said he supported continued use of the Guantanamo Bay detention facility for terror suspects, a sharp departure from an Obama administration that has supported prosecuting militants in American courts.
And he hinted he would be less eager than Obama's Justice Department to prod city police departments into court-enforceable improvement plans, known as consent decrees, to resolve allegations of pervasive civil rights violations. He said he did not consider it fair to criticise an entire department for what might be the actions of just a few.
"We need to be sure that when we criticise law officers, it is narrowly focused on the right basis for criticism," he said, adding that "to smear whole departments places those officers at greater risk."
He said allegations that he harboured sympathies toward the Ku Klux Klan, a violent white supremacist organisation, were false.
"I abhor the Klan and what it represents and its hateful ideology," Sessions said in his opening remarks.
Sessions was denied confirmation to a federal judgeship in 1986 after allegations emerged that he made racist remarks, including testimony that he called an African-American prosecutor "boy," an allegation Sessions denied.
Protesters, calling Sessions a racist repeatedly, interrupted, and were escorted out by Capitol police.
On Tuesday, the Washington Post published a letter written by Coretta Scott King, widow of late civil rights leader Martin Luther King, in which she decried Sessions for having intimidated black people against voting. The letter was part of a successful effort to block his appointment to the federal judgeship more than 30 years ago.
"The irony of Mr Sessions' nomination is that, if confirmed, he will be given a life tenure for doing with a federal prosecution what the local sheriffs accomplished twenty years ago with clubs and cattle prods," King wrote. "I believe his confirmation would have a devastating effect on not only the judicial system in Alabama but also on the progress we have made toward fulfilling my husband's dream."