WASHINGTON (Reuters) - U.S. 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 and enforce a law against waterboarding even though he voted against the measure.

Questioned for 10-1/2 hours by a U.S. Senate committee responsible for confirming his appointment, Sessions, a U.S. senator from Alabama, distanced himself from comments he had made defending Trump from criticism over a 2005 video that emerged in October showing Trump boasting about grabbing women’s genitals.

At the time, Sessions told The Weekly Standard magazine he would not characterize the behavior as sexual assault. He later said the comments were taken out of context. Asked on Tuesday whether “grabbing a woman by her genitals without consent is ... sexual assault,” he replied: “Clearly, it would be.”

With 10 days to go before Trump takes office, Sessions, 70, was the first Cabinet nominee to face questioning. He appeared before the Senate Judiciary Committee. Trump’s pick to run the Department of Homeland Security, retired Marine Corps General John Kelly, later went before the Homeland Security Committee.

As attorney general, Sessions would serve as the top U.S. law enforcement officer and be responsible for giving unbiased legal advice to the president and executive agencies.

With that in mind, lawmakers from both Trump’s Republican Party and the Democratic Party sought to establish how closely Sessions hewed to Trump positions and whether he could put aside his staunchly conservative political positions to enforce laws he may personally oppose.

A senator since 1997, Sessions was widely expected to be confirmed by the Republican-controlled Senate.

Protesters accusing Sessions of having a poor record on human rights interrupted the Capitol Hill proceedings several times.

Slideshow ( 8 images )

MUSLIM BAN

Sessions said he would not support banning anyone from the United States on the basis of religion and that Trump’s intentions were to restrict people from countries harboring terrorists, not all Muslims. Elected on Nov. 8, Trump at one point campaigned on a proposal to temporarily ban Muslims from entering the country.

Sessions said he favored “higher intensity of vetting” for refugees seeking to enter the United States from countries that harbor terrorists but that he would oppose ending the U.S. refugee program.

He also said he would enforce a 2015 law that outlawed waterboarding terrorism suspects even if it meant resisting Trump. The senator said he had voted against the law, believing those in high positions in the military and intelligence community should be able to do so.

During the campaign, Trump said waterboarding, which simulates drowning and is widely regarded as torture, was an effective technique and vowed to bring it back and make it “a hell of a lot worse.” More recently Trump has said retired Marine Corps General James Mattis, his nominee for secretary of defense, had persuasively argued against it.

Sessions said he would enforce laws upheld by the U.S. Supreme Court, even those he disagreed with, such as decisions making abortion and same-sex marriage legal.

CLINTON EMAILS

Sessions said the comments he made during the 2016 presidential campaign about Democrat Hillary Clinton’s email practices and charitable foundation would cloud the perception of impartiality if the Justice Department continued investigating Clinton. He said he would recuse himself and favored a special prosecutor to carry out any future investigations.

Trump, who defeated Clinton, said during the campaign that if elected, he would ask his attorney general to appoint a special prosecutor to see that Clinton go to prison for her use of a private email server while she was secretary of state and her relationship with her family’s charitable foundation.

Slideshow ( 8 images )

Sessions said he agreed with Trump in opposing Democratic President Barack Obama’s executive action that granted temporary protection to immigrant children brought to the country illegally by their parents and would not oppose overturning it.

Sessions, representing the deeply conservative Southern state of Alabama, has long opposed legislation that provides a path to citizenship for immigrants. He has also been a close ally of groups seeking to restrict legal immigration by placing limits on visas used by companies to hire foreign workers.

Sessions said he would be more aggressive in investigating and prosecuting abuses of the H-1B visa program, which he said allows companies to discriminate against American workers by hiring foreigners.

As head of the Justice Department, the attorney general oversees the immigration court system that decides whether immigrants are deported or granted asylum or some other kind of protection.

Sessions renewed his criticism of the Obama administration for not being tougher on countries that refuse to take back criminal migrants ordered deported from the United States.

A key plank of Trump’s election campaign was his pledge to deport illegal immigrants and build a wall along the U.S. border with Mexico.

Kelly told his hearing a physical barrier on its own is not enough to keep people and drugs from illegally entering the United States. In written testimony, Kelly said that “rapidly processing” and deporting immigrants in “significant numbers” would deter future illegal migration.

The U.S. immigration court system has a backlog of over 500,000 cases awaiting a decision on deportation, asylum or some other kind of protection. Many migrants arriving at the U.S.-Mexico border are given a notice to appear in court one to three years in the future.

DEFENSE AGAINST RACISM

Before the Judiciary Committee, Sessions several times defended himself against charges of racism. He said allegations that he harbored sympathies toward the Ku Klux Klan, a violent white supremacist organization, 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.

Democratic Senator Dianne Feinstein said the Senate Judiciary Committee had received letters from 400 civil rights organizations opposing his confirmation to the country’s top law enforcement post.