WASHINGTON (Reuters) - The U.S. Justice Department's third-ranking official, Rachel Brand, will resign and take a senior job at Walmart Inc WMT.N, with sources familiar with her decision saying on Friday that she had grown increasingly uncomfortable with President Donald Trump's attacks on her department and the FBI.

The department said Brand will be leaving her post in the coming weeks. Attorney General Jeff Sessions, himself repeatedly criticized by Trump, praised her “critical role in helping us accomplish our goals as a department.”

Brand, 44, was next in line of succession to Deputy Attorney General Rod Rosenstein for oversight of Special Counsel Robert Mueller’s investigation into potential collusion between Trump’s 2016 presidential campaign and Russia and whether the Republican president has unlawfully sought to obstruct the ongoing probe.

She became the latest senior law enforcement official to either resign or be fired since Trump took office in January 2017, a list that includes a Federal Bureau of Investigation director and deputy director, and an acting attorney general. Trump also ousted all remaining U.S. attorneys, the chief federal prosecutors in each state, who had served under Trump’s Democratic predecessor Barack Obama.

Brand’s resignation is different in that she was hand-picked for the job by Trump, assuming her post just five days after Mueller’s appointment in May 2017.

News of Brand’s departure came a week after Trump approved the release of a previously classified memo written by Republican lawmakers that portrayed the Russia investigation, initially handled by the FBI and now headed by Mueller, as a product of political bias against Trump at the FBI and Justice Department.

After just nine months on the job, Brand had become more and more uneasy with Trump’s escalating attacks on the Justice Department and the FBI, which she and other law enforcement professionals feared was beginning to undermine the rule of law, according to sources familiar with her thinking.

In a statement, Brand defended her department, saying, “The men and women of the Department of Justice impress me every day.”

The attacks have escalated in recent weeks as Republicans in Congress have criticized the handling by the Justice Department, FBI and the Federal Intelligence Surveillance Court of warrants for surveillance of a Trump campaign advisor, Carter Page, who had ties to Russia. Trump called the matter “a disgrace.”

Slideshow ( 3 images )

In a statement, Walmart said Brand will join the company as executive vice president for global governance and corporate secretary. “We are fortunate to have a leader of Rachel Brand’s stature join the company,” President and CEO Doug McMillon said.

‘BLOCK OUT THE TURMOIL’

Mary McCord, who served as acting head of the Justice Department’s National Security Division from October 2016 until April 2017 and helped oversee the FBI investigation into the collusion matter, said Brand’s resignation would further shake morale at the department.

“When the associate attorney general steps down after just nine months in the midst of a barrage of attacks on the department from the White House and Capitol Hill, it is another blow to the career women and men of the department who have been doing their jobs diligently while trying to block out the turmoil around them,” said McCord, now a visiting professor at Georgetown University’s Institute for Constitutional Advocacy and Protection.

The department is also facing a major backlog on leadership positions that still need confirmation by the U.S. Senate.

Rosenstein oversees Mueller’s investigation because Sessions recused himself from the matter last year. Trump also has criticized Sessions for recusing himself. Brand on Friday lauded Sessions’ “commitment to the rule of law.”

Rosenstein is the only official with legal authority to fire Mueller, and it is widely believed he would resign if ordered to do so without good cause. If Rosenstein resigned, that authority would have fallen to Brand under the department’s succession line. With her gone, the next person in line is Solicitor General Noel Francisco.

Any permanent replacement for Brand would have to be confirmed by the Senate and would likely face tough questioning about their willingness to preserve the Russia probe’s independence.

Slideshow ( 3 images )

Trump could use a 1998 law on executive branch vacancies to appoint a temporary replacement of his choice, as long as that person was an experienced Justice Department employee or another administration official already confirmed by the Senate.

Trump fired then-FBI Director James Comey, who was leading the agency’s Russia investigation, in May 2017, saying he took the action because of “this Russia thing.”

The FBI’s deputy director, Andrew McCabe, stepped down in January after Trump repeatedly criticized him on Twitter. McCabe’s wife previously ran as a Democrat for a seat in Virginia’s state Senate and received donations from then-Virginia Governor Terry McAuliffe, a close ally of Hillary Clinton and former president Bill Clinton.

Brand oversees the Justice Department’s civil, antitrust, tax and environmental and natural resources divisions. She played a crucial role in helping push for Congress to reauthorize the National Security Agency’s warrantless internet surveillance program after it faced opposition from some privacy-minded lawmakers in both parties. The measure passed, and Trump signed it into law in January.

A Justice Department official said that Jesse Panuccio, the Principal Deputy Associate Attorney General, will temporarily take over Brand’s job until a replacement is named.

He previously served as acting associate attorney general until Brand was confirmed and sworn in.