Maryland’s top lawyer asked a federal judge Tuesday to block Matthew Whitaker from serving as acting U.S. attorney general, contending that the appointment is illegal.

Maryland Attorney General Brian Frosh, D, said President Donald Trump's appointment of Whitaker to the nation's highest law enforcement post is unconstitutional and that he should be replaced by Deputy Attorney General Rod Rosenstein, who was confirmed by the Senate.

"Few positions are more critical than that of U.S. Attorney General, an office that wields enormous enforcement power and authority over the lives of all Americans," Frosh said in a statement.

Trump tapped Whitaker to serve as acting attorney general last week after Jeff Sessions resigned at the president's request. Whitaker's elevation has raised concerns about his qualifications, his past statements as a U.S. Senate candidate and his business practices.

The legal challenge to Whitaker's appointment comes as part of Maryland's ongoing federal lawsuit that is trying to force the Trump administration to uphold a key provision of the Affordable Care Act.

"Who the attorney general is at the core of this lawsuit," Frosh said in an interview Tuesday.

"Aside from the constitutional issue, this guy, Mr. Whitaker, has extreme views and that's dangerous in itself," said Frosh, adding he also expects any ruling in the state challenge to Whitaker's role would be appealed.

Frosh was not required to notify Gov. Larry Hogan, R, about a motion in an existing case. Hogan spokeswoman Amelia Chasse said the governor's office received no prior communication about the filing and declined to comment on it.

The legal action over Whitaker, first reported by NPR, says his appointment violates the Constitution's Appointments Clause that requires "principal" senior officials, like the attorney general, to be confirmed by the Senate. Maryland also contends it violates a federal statute that lays out the line of succession and gives authority to the deputy attorney general when the top job is vacant.

A Justice Department spokeswoman declined to comment on the Maryland filing. Since Whitaker's appointment Wednesday, Justice Department officials have defended it as legal under the Vacancies Reform Act, an argument repeated Tuesday by White House spokeswoman Mercedes Schlapp on Fox News.

A number of current and former government lawyers have said that while elevating Whitaker to attorney general was unwise and unprecedented, it is not illegal.

Sen. Dianne Feinstein, Calif., the Senate Judiciary Committee's ranking Democrat, also raised concerns Tuesday about Whitaker's appointment and called for hearings to better address the "serious questions" surrounding Trump's shake-up at the Justice Department and how it could affect the ongoing special-counsel investigation of Russian interference in the 2016 election.

Whitaker, who served as Sessions' chief of staff, is now supervising special counsel Robert Mueller III's investigation. He has previously been critical of the Russia probe when he was a political commentator and in a tweet.

In a letter to the committee's chairman, Sen. Charles Grassley, R-Iowa, Feinstein said she wants Whitaker to assure lawmakers "he will take no action to restrict or otherwise interfere with" the probe.

Grassley said Tuesday that he takes no issue with comments from Whitaker that disparaged the Mueller investigation, "as long as he made them as a private citizen."

"It seems to me that the president's the chief executive, and the president said he wasn't going to do that," Grassley said of the ongoing special counsel probe. "So, doesn't matter what Whitaker thinks. The president said it isn't going to be done."

Frosh's office said Tuesday that any action Whitaker takes in the health-care case on behalf of the federal government would be invalid because Whitaker should not be serving as acting attorney general.

The filing, prepared jointly with the law firm Goldstein & Russell, asks U.S. District Judge Ellen Hollander, who has the health-care case, to quickly issue an injunction to replace Whitaker with Rosenstein.

Maryland lawyers filed the underlying lawsuit in September after Sessions told Congress the Justice Department would not defend central provisions of the health-care act including protections for people with preexisting conditions.

Now that Whitaker is serving as acting attorney general, he is in position to make decisions on behalf of the federal government, including in the health-care litigation.

"It is troubling, to say the least, that the President is attempting to fill a 'vacancy' he created himself with a 'temporary' appointment that might last for many months or years," according to the filing from Frosh's office.

"It is especially troubling that the temporary appointee has not been confirmed by the Senate for his underlying position; the President might reasonably be seen as appointing a loyalist in a way that deliberately circumvents the Senate's constitutional advice-and-consent role."

- - -