The Justice Department on Wednesday gave a green light to President Trump's appointment of Matt Whitaker as acting attorney general.

The Office of Legal Counsel, a DOJ office that acts as an adviser to the attorney general, released a 20-page opinion upholding Whitaker's temporary role leading the department. Trump named Whitaker to the role on Nov. 7 after ousting Attorney General Jeff Sessions.

Congressional Democrats, including a swath of incoming House committee chairs once the party takes the majority in early January, have criticized Whitaker's appointment as acting attorney general. In 2017, Whitaker made comments questioning and at times criticizing special counsel Robert Mueller probe into the role of Russian agents in the 2016 presidential election, and how the Trump campaign may have benefited.

Many have also questioned whether Trump could appoint an official who didn't receive Senate confirmation in their current role.

Whitaker was serving as Sessions' chief of staff when appointed acting attorney general.

A senior Justice Department official told reporters Wednesday morning that prior to Sessions’ ouster and Whitaker’s appointment, Trump had asked the OLC if he would be able to designate a senior department official should a vacancy in the attorney general's office arise.

However, the official declined to say when the White House began questioning OLC.

Rather than appoint Deputy Attorney General Rod Rosenstein, the Justice Department's second-highest official, Trump invoked a provision in the Federal Vacancies Reform Act to appoint Whitaker. Rosenstein had overseen the Mueller probe since March 2017, when Sessions recused himself due to his involvement in Trump's presidential campaign while a senator from Alabama.

The OLC opinion says Whitaker could was be installed as acting attorney general under the VRA because “he had been serving in the Department of Justice at a sufficiently senior pay level for over a year.”

The VRA allows the president to use the law to “depart from the succession order specified” under a Justice Department succession statute, the opinion says.

The opinion also says Whitaker’s designation is consistent with the Appointments Clause of the U.S. Constitution, because while the attorney general is a position that requires Senate confirmation, “someone who temporarily performs his duties is not.”

Beginning in 1792, the opinion argues, Congress authorized the president “to ensue the government’s uninterrupted work by designating persons to perform temporarily the work of vacant offices.”

The OLC said it identified “over 160 times” before 1860 in which non-Senate confirmed persons performed, on a temporary basis, "the duties of such high offices” such as secretaries of state, Treasury, war, Navy, and interior.

“While designations to the office of attorney general were less frequent we have identified at least one period in 1866 when a non-Senate-confirmed assistant attorney general served as acting attorney general,” the opinion states. “Mr. Whitaker’s designation is no more constitutionally problematic than countless similar presidential orders dating back over 200 years.”

The opinion also cities appointments by former Presidents George W. Bush and Barack Obama under the VRA, putting non-Senate-confirmed officials in “several lines of agency succession and actually designated unconfirmed officials as acting agency heads.”

The legality of Whitaker's appointment may not be a settled issue, though.

The OLC opinion comes the day after the state of Maryland challenged the legality of Whitaker's appointment as part of its lawsuit on the Affordable Care Act. The opinion asks the federal judge to issue an order replacing Whitaker with Rosenstein.