A top State Department official is resigning from the Biden administration, penning a scathing memo on his way out that criticized the administration's use of a Trump-era regulation that allows the government to deport illegal immigrants.

In the memo, obtained by Politico, State Department senior adviser Harold Koh assailed the administration's use of the Trump-era Title 42 as "inhumane."

"It simply is not worthy of this Administration that I so strongly support," Koh said in the memo, which was dated Oct. 2.

Title 42 gives the administration the ability to bar people from entering the country during a health crisis such as the COVID-19 pandemic. The Biden administration has used it to deport thousands of migrants without giving them a chance to seek asylum.

MAJORITY OF AMERICANS SUPPORT ACCEPTING AFGHAN REFUGEES WHO WORKED WITH US, NEW POLL SHOWS

But critics of the policy such as Koh contend that it is unlawful.

"I believe this Administration’s current implementation of the Title 42 authority continues to violate our legal obligation not to expel or return ["refouler"] individuals who fear persecution, death, or torture, especially migrants fleeing from Haiti," Koh argued, adding that "lawful, more humane alternatives plainly exist, and there are approaching opportunities in the near future to substitute those alternatives in place of the current, badly flawed policy."

But the White House and State Department have argued that their continued use of the policy is centered on recommendations from the Centers for Disease Control and Prevention.

"Title 42 is a public health authority, not an immigration one, and that authority rests with the [Center for Disease Control and Prevention]," a White House official said of the administration's use of the policy. "The CDC has determined that the continued expulsion of certain individuals under Title 42 is necessary due to the risks of transmission and spread of COVID-19 in congregate settings, such as U.S. Customs and Border Patrol stations, as well as the threat from emerging variants."

The CDC on Saturday noted that invoking Title 42 "continues to be necessary at this time."

Title 42 has also been the subject of a winding court battle, most recently after the U.S. Court of Appeals for the D.C Circuit issued a stay of a federal judge's ruling that the policy was unlawful. That stay preserved the administration's ability to continue using Title 42 while the case is decided.

CLICK HERE TO GET THE FOX NEWS APP

But in his memo, Koh noted differences in the administration's approach to Afghan refugees fleeing the country after the U.S. withdrawal and migrants seeking asylum at the southern border.

"Our actions and approaches regarding Afghan refugees stand in stark contrast to the continuing use of Title 42 to rebuff the pleas of thousands of Haitians and myriad others arriving at the Southern Border who are fleeing violence, persecution, or torture," Koh said.