The Department of Justice has ruled that acting Attorney General Matthew Whitaker can serve in the position.

Whitaker came under criticism after President Donald Trump appointed him when Jeff Sessions stepped down. Whitaker served as Sessions’ chief of staff.

The DOJ’s Office of Legal Counsel reached its decision from “provisions of the Vacancies Reform Act, which allows for the appointment of a senior staffer who had been in office for at least 90 days.”

A senior official at the DOJ said that “the White House sought legal guidance from Sessions’ own department on available options for replacing the attorney general” before Sessions resigned.

From USA Today:

Although Justice’s own line of succession provides for the deputy attorney general or other confirmed officials to serve as acting attorney general in the event of a vacancy, the Justice opinion argued that the internal provision for succession “does not displace the president’s authority to use the Vacancies Reform Act as an alternative.”

The opinion went on to assert that Whitaker’s designation was in keeping with the Constitution, which requires the president to obtain Senate approval before appointing so-called “principal” officers.

“Although an attorney general is a principal officer requiring Senate confirmation, someone who temporarily performs his duties is not,” the opinion stated. “As all three branches of government have long recognized, the president may designate an acting official to perform the duties of vacant principal office, including a Cabinet office, even when the acting official has not been confirmed by the Senate.”

The last time an acting attorney general served without Senate confirmation was in 1866, when Assistant Attorney General J. Hubley Ashton served for six days after the resignation of Attorney General James Speed, according to the report.

The opinion said presidential authority to make such designations dated to the early years of the government, citing 160 appointments before 1860 in which “non-Senate-confirmed persons performed, on a temporary basis,” the duties of secretaries of State, Treasury, War, Navy, Interior and Postmaster General.

“Mr. Whitaker’s designation is no more constitutionally problematic than countless similar presidential orders dating back over 200 years,” the opinion stated.