Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

WASHINGTON — The Justice Department's No. 3 attorney had been unhappy with her job for months before the department announced her departure on Friday, according to multiple sources close to Associate Attorney General Rachel Brand.

Brand grew frustrated by vacancies at the department and feared she would be asked to oversee the Russia investigation, the sources said.

She will be leaving the Justice Department in the coming weeks to take a position with Walmart as the company's executive vice president of global governance and corporate secretary, a job change that had been in the works for some time, the sources said.

As far back as last fall, Brand had expressed to friends that she felt overwhelmed and unsupported in her job, especially as many key positions under her jurisdiction had still not been filled with permanent, Senate-confirmed officials.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Four of the 13 divisions overseen by the associate attorney general remain unfilled, including the civil rights division and the civil division, over one year into the Trump administration.

While Brand has largely stayed out of the spotlight, public criticism of Deputy Attorney General Rod Rosenstein by President Donald Trump worried Brand that Rosenstein's job could be in danger.

Should Rosenstein be fired, Brand would be next in line to oversee Special Counsel Robert Mueller's investigation into Russia's meddling in the 2016 election, thrusting her into a political spotlight that Brand told friends she did not want to enter.

The Justice Department pushed back on NBC's report.

"It is clear these anonymous sources have never met Rachel Brand let alone know her thinking. All of this is false and frankly ridiculous,” said Justice Department spokeswoman Sarah Flores.

Friends and former colleagues of Brand have said there were pull as well as push factors that led to her decision.

"It was such a good job that she couldn’t turn it down," said Jamie Gorelick, a former Deputy Attorney General under the Clinton administration.

Brand has had a long legal career that has spanned several administrations, including under Democratic President Barack Obama and Republican George W. Bush.

In announcing her departure, Attorney General Jeff Sessions described Brand as "a lawyer’s lawyer," noting that she graduated from Harvard Law School and clerked at the Supreme Court.

In the same statement, Brand said, "I am proud of what we have been able to accomplish over my time here."