President-elect Donald Trump Donald John TrumpREAD: Cohen testimony alleges Trump knew Stone talked with WikiLeaks about DNC emails Trump urges North Korea to denuclearize ahead of summit Venezuela's Maduro says he fears 'bad' people around Trump MORE’s choice to be secretary of Homeland Security went on record as holding views counter to Trump in a number of areas at a largely genial Senate confirmation hearing Tuesday.

Under questioning from Democrats and a Republican, retired Gen. John Kelly broke with Trump on the effectiveness of a border wall, using torture to interrogate terrorism suspects and whether Russia engaged in hacking to influence the election. He also said he opposed compiling a database of Muslims as part of a counterterrorism effort.

But Kelly did side with his would-be boss on enforcing immigration laws in so-called sanctuary cities and would not commit to not using information submitted by young undocumented immigrants as part of President Obama’s DACA program against them.

ADVERTISEMENT

Still, in all, senators seemed poised to confirm Kelly, with Sen. Heidi Heitkamp Mary (Heidi) Kathryn HeitkampOvernight Energy: Trump taps ex-oil lobbyist Bernhardt to lead Interior | Bernhardt slams Obama officials for agency's ethics issues | Head of major green group steps down Trump picks ex-oil lobbyist David Bernhardt for Interior secretary On The Money: Shutdown Day 27 | Trump fires back at Pelosi by canceling her foreign travel | Dems blast 'petty' move | Trump also cancels delegation to Davos | House votes to disapprove of Trump lifting Russia sanction MORE (D-N.D.) calling the hearing a “love fest.”

Sen. Ron Johnson Ronald (Ron) Harold JohnsonWhite House pleads with Senate GOP on emergency declaration White House, GOP defend Trump emergency declaration GOP senator says Republicans didn't control Senate when they held majority MORE (R-Wis.) said after the hearing he expects Kelly to be confirmed on Trump's first day in office or shortly thereafter.

“We all share the same goal; we want a safe, prosperous, secure America,” Johnson said. “We realize the president, whether from your party or not, needs to have his national security, homeland security team in place as soon as possible. I just don’t see any stumbling blocks to this confirmation.”

Sen. Claire McCaskill Claire Conner McCaskillCORRECTED: Hawley used a state-owned car for campaign travel as AG: report Poll: 33% of Kentucky voters approve of McConnell McCaskill: Lindsey Graham 'has lost his mind' MORE (D-Mo.), ranking member of the committee, said she was heartened by Kelly’s responses during the hearing.

“I’m confident that he will be a moderating influence on President-elect Trump and some of his more divisive rhetoric that he displayed during the campaign when it comes to immigration and a Muslim ban and all the other things that were covered in the hearing today,” she said.

Toward the beginning of the hearing, Sen. John McCain John Sidney McCainGOP lobbyists worry Trump lags in K Street fundraising Mark Kelly kicks off Senate bid: ‘A mission to lift up hardworking Arizonans’ Gabbard hits back at Meghan McCain after fight over Assad MORE (R-Ariz.), who also gave a glowing introduction of Kelly, asked Kelly if he supports the use of torture. Trump said during the campaign that he would return to waterboarding and a “hell of a lot worse” to interrogate terrorism suspects.

“I don’t think we should ever come close to crossing a line that is beyond what we as Americans should expect to follow,” Kelly said.

Asked by McCain whether that includes following the Geneva Conventions, Kelly said “yes.”

McCain also asked Kelly whether he agrees a border wall is a not the best way to “prevent that flow of drugs and people.” The wall has been one of Trump’s key promises.

“A physical barrier in and of itself would not do the job,” Kelly responded, saying there also needs to be drones, sensors and other technology in place to patrol the border. Kelly also said border protection starts with partnering with countries to the south.

McCaskill asked Kelly whether he agrees with the intelligence community’s assessment that Russia hacked Democratic systems to influence the election. Trump has been dismissive of the findings, treating them as an attack on his legitimacy.

Kelly said he agrees with the assessment “with high confidence.”

Sen. Gary Peters (D-Mich.) repeatedly asked Kelly about Trump’s plans with regard to Muslims, saying Trump’s comments caused “particular anxiety” in his state, which is home to a large Muslim population.

Kelly said it is his understanding that putting mosques under surveillance and establishing a Muslim database would violate the Constitution.

He also said religion should not be the focus of counterterrorism efforts.

“I don't think it is ever appropriate to focus on something like religion as the only factor,” Kelly said.

But Kelly demurred on breaking from Trump on other immigration policies.

Kelly was pressed by Sen. Kamala Harris (D-Calif.) on whether he would commit to not deporting people with the use of personal information submitted to the government as part of Obama’s program to protect young undocumented immigrants who were brought to the U.S. as children from deportation.

Kelly said he has not been a part of the Trump’s teams discussion on the at subject and so couldn’t make the commitment Harris was looking for. But he promised to “keep an open mind” and “look very long and hard” at the issue.

Kelly also indicated he’d be willing to go after so-called sanctuary cities, which give shelter to undocumented immigrants.

“I don’t think I have the authority to pick and choose what laws need to be followed,” Kelly said in response to a question from Sen. James Lankford (R-Okla.) “I understand the perspective of some of the local leaders, but I do think the law is the law.”