WASHINGTON — President Trump’s decision to name as acting attorney general a little-known political appointee who has never been confirmed by the Senate has come under increasing criticism by legal scholars on both the right and left who say the appointment is unconstitutional.

Although Trump clearly had the authority to fire Atty. Gen. Jeff Sessions, replacing him with Matthew Whitaker doesn’t pass constitutional muster, they say.

“I don’t see how he can hold that office. Whitaker’s appointment is not consistent with the Appointments Clause of the Constitution,” said John Yoo, a UC Berkeley law professor who worked in the Justice Department under President George W. Bush.

Many Democrats — and some Republicans — have said they believe Trump put Whitaker in the job to try to stop, or at least limit, the investigation that special counsel Robert S. Mueller III is conducting into Russian efforts to sway the 2016 election.

But the rising volume of objections, and questions about Whitaker’s past business dealings and controversial remarks, may be affecting Trump’s calculations. On Friday morning, before leaving for a weekend trip to France, Trump appeared to distance himself from Whitaker.

“Matt Whitaker — I don’t know Matt Whitaker. Matt Whitaker worked for Jeff Sessions, and he was always extremely highly thought of, and he still is. But I didn’t know Matt Whitaker,” Trump said when reporters asked about him.

“The choice was greeted with raves, initially, and it still is in some circles,” he added. “You know, it’s a shame that no matter who I put in, they go after them.”

A month ago, in an interview on Fox News’ “Fox & Friends,” Trump said just the opposite.

“I can tell you Matt Whitaker’s a great guy. I mean, I know Matt Whitaker,” he said then.

Trump did not respond directly when asked about the legal dispute, which involves the constitutional provision that says the president “shall nominate, and by and with the advice and consent of the Senate, shall appoint” ambassadors, judges and “all other officers of the United States.”

The Constitution allows “inferior officers” to be appointed by the president or by the “heads of departments.” But the attorney general is what the Supreme Court has referred to as a “principal officer” — a person who ordinarily must have Senate approval.

Last year, the justices ruled in a case raising a similar issue and struck down President Obama’s appointment of an acting general counsel at the National Labor Relations Board.

“The Senate’s advice and consent power is a critical structural safeguard of the constitutional scheme,” said Chief Justice John G. Roberts Jr. in NLRB vs. SW General.

“The framers envisioned it as an ‘excellent check upon a spirit of favoritism in the president’ and a guard against ‘the appointment of unfit characters,’” he wrote, quoting a passage from the “Federalist Papers.”

Looking back at early American history, Roberts said that Congress in 1792 had allowed President George Washington to make temporary appointments of “acting officials.”

He resolved the case without deciding the constitutional issue, ruling that Obama had violated the Federal Vacancies Reform Act of 1998 by appointing an acting general counsel who had been nominated for the same post at the labor board, but was not confirmed by the Senate.

Justice Clarence Thomas in a concurring opinion went further. He said the Constitution makes clear “principal officers must be appointed by the president by and with the advice and consent of the Senate.”

Whitaker’s suspect status could pose legal problems for the government. In the past, the Supreme Court has cast doubt on the legality of an agency’s actions if a top official was serving illegally.

Since the attorney general is cited by name in many of the Justice Department’s actions, including criminal cases, and in regulations the department issues, Whitaker’s status could quickly be challenged in court.

Los Angeles attorney Alexander Stern said he and other lawyers planned to file such a challenge. Sen. Richard Blumenthal (D-Conn.) also said he was considering such a suit.

“You always need a plaintiff with standing, but that shouldn’t be difficult,” Stern said. “If you are being sued, prosecuted by, or suing the attorney general,” a challenge could be in order, he said.

Whitaker’s appointment marked a sharp break with precedent. In the past, when an attorney general left office, the job would be filled by another senior Justice Department official who had been confirmed by the Senate.

“As far as know, it would be the first time in U.S. history the president has designated as an ‘acting’ attorney general someone who was not then serving in an office to which he or she was appointed by and with the advice and consent of the Senate,” wrote Georgetown law professor Martin Lederman, who worked in the Justice Department under Obama.

Senate Democratic leader Charles E. Schumer of New York raised the same issue in a letter to Trump on Friday.

“I am not aware of any precedent for appointment of an official who has not been confirmed by the Senate to serve as acting attorney general,” he wrote.

The first people to put a spotlight on the issue were Washington attorney Neal K. Katyal, who served as an acting solicitor general under Obama, and George T. Conway III, a prominent conservative lawyer who is also the husband of Kellyanne Conway, a counselor to Trump.

Writing in the New York Times, they said Whitaker’s appointment is “illegal. And it means that anything that Mr. Whitaker does, or tries to do, in that position is invalid.”

Walter Dellinger, a former White House lawyer under President Clinton, said Trump could have easily chosen another of his Senate-confirmed appointees to serve as acting attorney general, which gives the government a weak case in defending Whitaker.

“This is a terrible case for the government to argue that the officer should not have to be Senate confirmed. Their best argument might be that there are some urgent situations in which no Senate-confirmed officer is available,” he said.

“But that is very far from true here where there is a Senate-confirmed deputy attorney general, solicitor general, assistant attorney general for the Office of Legal Counsel and more who are perfectly competent to step in.”

Whitaker, 49, was a U.S. attorney in Iowa from 2004 to 2009 and was confirmed to the Senate for that post. He later ran as a Republican candidate for Senate in 2014, but came in fourth in the GOP primary.

He gained attention in Washington as a conservative commentator, including on CNN, where he was a critic of Mueller’s investigation. Late last year, the White House installed him as a chief of staff for Sessions.

How long he’ll last in the new job — and whether he’ll take any significant steps against Mueller — remains to be seen.

Speaking to reporters in his home state on Friday, Senate Majority Leader Mitch McConnell of Kentucky predicted that Whitaker’s stint as acting attorney general would be short.

“I think this will be a very interim AG,” McConnell said, adding that he thinks the president will “pretty quickly” send the Senate a nominee for a new attorney general. He added that the “president has said repeatedly he’s not going to dismiss the Mueller investigation.”

david.savage@latimes.com