Some Justice Department officials are concerned that acting attorney general Matt Whitaker may have violated federal guidelines and his department's own guidance on the government shutdown by taking time on Wednesday to give a politically-tinged speech promoting Trump administration policies of little urgency.

"I think it's deeply hypocritical," one federal prosecutor said of Whitaker's speech, speaking on the condition of anonymity because he was not authorized by the Justice Department to speak publicly.

According to a message sent to U.S. prosecutors around the country last week, those deemed "excepted" and required to work through the shutdown — without a paycheck — can only perform work on matters related in some way to substantial threats against life or property. And in a memo posted online by the Justice Department last week, "ancillary functions" such as "public affairs activities and community outreach ... may be conducted only to the extent the failure to perform those functions prevents or significantly damages" department operations.

At issue are remarks Whitaker gave Wednesday to the conservative Heritage Foundation in Washington, D.C. The Justice Department said in a press release that the remarks were intended "to commemorate [the] 25th anniversary of the Religious Freedom Restoration Act" — a law Congress passed with near-unanimous support in 1993 to help protect worshipers' rights.

Wednesday's event had an undeniable political bent: The Heritage Foundation's stated mission is to "promote conservative public policies," and in introducing Whitaker, the foundation's president charged that "the political left has actively worked to undercut our freedoms," citing efforts related to abortion and other controversial matters.

During his own remarks, Whitaker praised President Donald Trump as someone "who is standing up for the First Amendment," insisting "others" have tried to stand in the way.

"For example," Whitaker said, "we’ve seen nuns ordered to pay for contraceptives," and he noted that one U.S. senator tried to block "an evangelical Christian" from joining the Trump administration. Whitaker did not mention that the nominee – Russell Vought, now the acting director of the Office of Management and Budget — had claimed Muslims "have a deficient theology" and "stand condemned."

Whitaker "could have used his platform to call for an end to the shutdown so his employees won't miss mortgage payments, but instead he made a partisan speech," one career Justice Department official said to ABC News. Whitaker is expected to be replaced atop the Justice Department in the coming weeks.

Last week, a top Justice Department official in Washington sent an email to department offices around the country, laying out "what employees deemed excepted and working in the office may do."

"We have been directed to continue only activities that relate to 'emergencies involving the safety of human life or the protection of property,' i.e., where there is a reasonable likelihood that the safety of human life or the protection of property would be compromised to some significant degree by delay in the performance of the function in question," the email to senior prosecutors said. "The risk should be real, not hypothetical or speculative."

The email, obtained by ABC News, said administrative or other work "essential" to supporting the protection of life or property is also permitted. And the email urged senior prosecutors to "remind all of your employees who are working during the furlough as excepted employees that they should only perform work as described above."

"All other non-excepted work should be performed after the furlough is over," the email said.

Speaking to ABC News on the condition of anonymity, one federal prosecutor accused certain Justice Department officials of "talking out of both sides of their mouths here," saying it's a stretch to interpret the guidance issued last week as permitting "a speech or pursuits involving religious liberty."

A Justice Department spokeswoman declined to comment for this article.

Despite questions over whether Whitaker should have given such a speech during the shutdown, it could be a technicality that might prohibit him from doing so. According to rules governing furloughs, a Senate-confirmed member of the president's Cabinet may be able to use his or her time for non-essential functions, because such an official can't technically be furloughed. But Whitaker is serving as attorney general in an "acting" capacity — he was not confirmed by the Senate.

When the government was shut down for weeks in late 1995 and early 1996 during President Bill Clinton's administration, then-attorney general Janet Reno still held her weekly, on-camera press briefings with reporters. In one of those events, she announced a big settlement related to environmental violations, and in another she announced she was suffering from Parkinson's disease.

Previous guidance and legal opinions authored by Justice Department lawyers have said employees called to work during a shutdown may perform some non-essential functions while in the office, but only during "brief" intervals that arise when the employee "is not engaged in an excepted function."

"In such cases, the employee may remain at work, and may perform non-excepted functions during these intervals," according to guidance issued to Justice Department employees in October 2013, when the government was shuttered for more than two weeks.

Whitaker, however, gave his remarks outside the Justice Department, he wrote them ahead of time, and they had been planned for weeks, with the Justice Department issuing a press release promoting the event the day before.

In all, Whitaker spoke for more than 15 minutes about how "religious freedom has made this country stronger."

"And that is why threats to religious freedom are also threats to our national strength," he said at the Heritage Foundation. "I am hopeful that we can recover the consensus in support of religious freedom that came together 25 years ago."

He was likely away from the Justice Department for less than an hour.

Whitaker has become a frequent target of criticism from Democratic lawmakers and others, who question whether he can impartially oversee the Justice Department. In particular, his detractors have raised concerns over statements he made before joining the Justice Department that criticized special counsel Robert Mueller's investigation, and they have demanded to know why Whitaker refuses to recuse himself from oversight of the Mueller probe even though senior ethics officials within the Justice Department told him he should.

But after Trump appointed Whitaker to temporarily head the Justice Department, deputy attorney general Rod Rosenstein, a frequent target of Trump's ire, called Whitaker a "superb choice."

"He certainly understands the work, understands the priorities and principles of the department, and I think he's going to do a superb job," Rosenstein said.

Whitaker is expected to step aside as acting attorney general soon. William Barr, who served as attorney general under the George H. W. Bush administration, has been nominated by Trump to become attorney general again, and Barr is likely to be confirmed by the Senate.