President Donald Trump's nominee for US attorney general, William Barr, told politicians on Tuesday that he would protect a federal probe into alleged Russian election meddling from political pressure, stressing he would bring independence to the job and not shy away from breaking ranks with the administration.

"I will not be bullied into doing anything that I think is wrong - by anybody, whether it be editorial boards or Congress or the president. I'm going to do what I think is right," Barr said at his confirmation hearing before the Senate Judiciary Committee.

Barr is expected to win confirmation in the Republican-controlled Senate to serve as the nation's top law enforcement officer, which would put him in charge of Special Counsel Robert Mueller's investigation into Russia's interference in the 2016 election and any possible collusion between Moscow and Trump's campaign.

"On my watch, Bob will be allowed to complete his work," Barr said.

Democrats worry that Trump's administration may try to undercut the investigation, which has been a frequent target of the president and his allies.

Barr, who was attorney general under Republican President George HW Bush in the 1990s, said his primary loyalty would be to the rule of law, not Trump. He said he did not seek out the job and was reluctant to accept when Trump offered it to him.

Trump frequently criticises the Mueller probe as a "witch-hunt" and has denied any collusion with Russia or obstruction of justice. Russia has denied US intelligence agencies' findings that it interfered in the 2016 election.

Barr said he doesn't believe Mueller "would be involved in a witch-hunt", adding that it was "unimaginable" that the special counsel would do anything in the investigation that would justify reeling it in or shutting it down.

Barr said he agreed with Mueller's charge that Russian entities interfered in the election, or at least tried to do so. He said he described Mueller, a longtime friend, as a "straight shooter" when Trump asked about him.

Mueller is due to submit a final report to the attorney general, prompting concern from some Democrats that the Trump administration will try to quash his findings. Barr said he would not let Trump modify the report and would make public as many of Mueller's findings as possible.

Tough questions on Mueller memo

But Barr faced tough questions from Democrats about an unsolicited, 19-page memo he wrote last year that called Mueller's probe "fatally misconceived" for examining whether Trump obstructed justice by firing FBI Director James Comey in 2017.

"It does raise questions about your willingness to reach conclusions before knowing the facts, and whether you prejudge the Mueller investigation," said Senator Dianne Feinstein, the Judiciary Committee's top Democrat.

Barr said his memo did not question the legitimacy of the probe as a whole, but only expressed concerns that the special counsel might be improperly interpreting one aspect of the law.

"I think it was entirely proper," he said of the memo, saying it was not unusual for former Justice Department officials to share their views of legal matters.

He said he had written a similar memo criticising the department's corruption case against Democratic Senator Bob Menendez, which ended in a mistrial in 2017.

190112054128496

Barr's views of presidential power could be important as prosecutors and Democrats in the House of Representatives, where they hold the majority, intensify investigations of Trump's personal business practices and his presidency.

Barr could benefit from the fact that some Democrats view him as a better option than the man who took over the job after Trump forced out Jeff Sessions last year, acting Attorney General Matt Whitaker.

During his tenure as attorney general, Sessions faced repeated attacks from Trump for recusing himself from oversight of the Russia probe after it emerged that he had met Russian officials while working with the Trump election campaign. Barr said Sessions "did the right thing" by recusing himself.

Mueller has secured indictments against or guilty pleas from 33 people and three Russian companies, including former Trump campaign chairman Paul Manafort.

'Imperative to have border security'

On immigration, Barr said reform is "long overdue" and expressed support for Trump's hardline policies, including funding a wall on the US-Mexico border.

Asked about the partial government shutdown, which was prompted by an impasse over funding for a border wall, Barr said he would like to see a deal reached where Congress recognised that it was "imperative to have border security".

Barr also said he believed so-called sanctuary cities, jurisdictions that limit cooperation with federal immigration authorities, were hurting law enforcement's ability to safeguard the public. Sessions sued California over the policies.

Barr also pledged at his confirmation hearing to support and uphold the False Claims Act, a law that lets whistleblowers file lawsuits to help the federal government recover losses due to fraud.

"I will diligently enforce the False Claims Act," Barr told Republican Senator Charles Grassley, marking a reversal from prior comments he made in which he declared the law was an abomination and unconstitutional.

The nominee also said he favours strong enforcement of US antitrust laws and would examine statistics showing that scrutiny of mergers is at historic lows.

"I am for vigorous enforcement of the antitrust laws to preserve competition," he said. "This is going to be an area I want to get into".