WASHINGTON — The Justice Department has concluded that Matt Whitaker, appointed by President Donald Trump as the acting attorney general, had no legal reason to recuse and is overseeing Robert Mueller's special counsel investigation, according to a person familiar with the decision on Thursday.

However, an agency ethics adviser told Whitaker it was a “close call” and recommended that he step aside — a recommendation Whitaker declined to follow, according to a senior Justice Department official.

Formal notice of his role was expected to come in a letter to congressional Democrats who had said his critical comments about the Mueller investigation, made when he was a conservative commentator, require him to recuse — that is, to take himself out of any supervision of the case.

Former Attorney General Jeff Sessions, who resigned under pressure in November, recused himself from oversight of the probe into Russian interference in the 2016 election because he was an active campaigner for then-presidential candidate Trump. Deputy attorney general Rod Rosenstein then began overseeing the probe.

After Sessions' ouster, Trump appointed Whitaker as acting attorney general. Almost immediately, Whitaker came under fire for previous comments against Mueller's investigation.

As a legal commentator on CNN, Whitaker once floated a scenario in which Sessions was replaced and his successor "just reduces [Mueller's] budget to so low that his investigation grinds to almost a halt."

In a letter to the Justice Department's top ethics officer in November, seven Democratic leaders said, "Mr. Whitaker's statements indicate a clear bias against the investigation that would cause a reasonable person to question his impartiality."

The letter was signed by the House and Senate Democratic leaders, Nancy Pelosi and Chuck Schumer, along with the ranking Democrats on the Judiciary and Intelligence committees of the two chambers and by Elijah Cummings, ranking Democrat on the House government oversight committee.

Justice Department officials say Whitaker has been overseeing the Mueller investigation since shortly after he was appointed acting attorney general.

Rep. Adam Schiff, D-Calif., the likely incoming chair of the House Intelligence Committee, demanded in a tweet on Thursday that the DOJ produce the memo in which ethics officials cleared Whitaker to oversee Mueller's investigation despite his past statements criticizing the probe.

"This ethics opinion must be shared with Congress. Now. DOJ officials must avoid not only actual impropriety but the appearance of impropriety," Schiff said. "Given Whitaker’s prejudicial comments about Mueller, the public can have no confidence in him. We will scrutinize his every action."

But a senior Justice Department official told NBC News Thursday that Whitaker was never required to seek formal ethics advice and did not do so. He had no financial, familial or fiduciary ties to any subject of the investigation, the official said.

Whitaker did, however, request “informal” advice from an agency ethics officer. That person told Whitaker it was a “close call” and that if he or she were the attorney general, “I would recuse,” the official said.

The acting attorney general has not been fully briefed on Mueller’s investigation but has been apprised of major developments per protocol. Rosenstein continues to play the leading role in overseeing the investigation, but Whitaker has the ultimate authority to approve or challenge new investigative steps.

At a news conference Thursday in which the Justice Department announced charges against two Chinese hackers, Rosenstein, the deputy attorney general, said that Mueller's investigation is "being handled appropriately."

"In terms of my role, as we've described previously, we've continued to manage the investigation as we have in the past — and it's being handled appropriately," Rosenstein said. "Whether it's Bob Mueller or Rod Rosenstein or Matt Whitaker or Bill Barr, that investigation's going to be handled appropriately by the Department of Justice."

He also addressed the "unsolicited memo" sent to the Justice Department earlier this year by Bill Barr, who Trump announced earlier this month was his pick to succeed Sessions.

The memo, which was first reported by The Wall Street Journal on Wednesday, criticized part of Mueller's Russia investigation as "fatally misconceived."

Rosenstein praised Barr, who previously served as attorney general under President George H.W. Bush, but said the memo "had no impact on our investigation" and that "our decisions are informed by our knowledge of the actual facts of the case, which Mr. Barr didn't have."

Sen. Dianne Feinstein, D-Calif., the ranking member of the Senate Judiciary Committee, called Barr's memo "very troubling." She pointed out that the document was proactively drafted just six months ago, and questioned why it was shared with Rosenstein and Trump's lawyers.

"The drafting of this memo was not undertaken lightly. The memo presents a thoroughly crafted legal argument against investigating the president, with pointed conclusions that the president is above the law. The president is not above the law," Feinstein said in a statement on Thursday.

“There's no reason for a lawyer in private practice to do this unless he was attempting to curry favor with President Trump and convey that he would protect the president," she added.

She added, “The Justice Department has been under relentless attack by this president and it needs a leader who is independent and able to defend the rule of law. The Attorney General is charged with protecting the people, not the president.”

Pete Williams reported from Washington, and Dartunorro Clark reported from New York.