The U.S. Justice Department's third-ranking official, Rachel Brand, will resign and take a senior job at Walmart Inc., 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.