WASHINGTON — A Justice Department lawyer who argued in court that the federal government wasn’t legally required to provide soap and toothbrushes to detained migrant children in some conditions is defending herself after video of the exchange went viral, saying in a message to her friends that the U.S. “should do our very best to care for kids” while in custody.

In a lengthy note on Facebook obtained by NBC News, Sarah Fabian says she shares “many people’s anger and fear” about the nation’s future. Saying she is “not an official of any administration,” Fabian points out that she’s a career federal employee who’s served in her role since 2011, long before President Donald Trump took office.

Fabian expresses regret that her comments in the video “struck a nerve” but argues that selective editing, combined with a lack of precision in her argument created a false impression.

“I think that many many people believe I was in court Tuesday arguing against providing certain hygiene items to kids,” Fabian writes, adding later: “I do not believe that’s the position I was representing.”

In testimony last week before the Ninth Circuit Court of Appeals, Fabian argued that the requirement that the government provide “safe and sanitary” conditions for detained children didn’t necessarily require showers, soap or toothbrushes. In appealing a 2017 ruling that found the government violated the 1997 consent decree known as the Flores Settlement Agreement, Fabian argued that the decree does not specifically enumerate those items as mandatory.

Clips of her argument, along with the astonished reactions from judges hearing her testimony, were posted online and went viral, turning Fabian into a face of the Trump administration’s treatment of detained child migrants, which has attracted increasing outrage from Congress and the public. The Justice Department previously told The National Review that Fabian has been receiving death threats.

Fabian’s message on Facebook appeared aimed at distancing herself from the political debate and sharp criticism over the treatment of children detained after crossing the border. As a Justice Department lawyer, Fabian’s job involves defending the federal government in legal cases regardless of personal views on a given topic.

“I will say that I personally believe that we should do our very best to care for kids while they are in our custody, and I try to always represent that value in my work,” Fabian writes. “A vast majority of the work that I do is not public, but I strive to help people by my participation in the process.”

At another point, she adds: “I think I share many people’s anger and fear at times over the future of our country, and I want to work to make it better too.”

The letter was posted to Fabian’s wall with privacy settings that enabled it to be seen by her Facebook friends — but not by the general public.

NBC News obtained a screenshot of the message from a person who is friends on Facebook with Fabian. Another Facebook friend who also saw the message confirmed its authenticity. Both spoke to NBC News on the condition of anonymity.

Fabian did not respond to inquiries about the message.

In the message, Fabian points out that she’s “not permitted to make any statements in any official capacity,” calling it a “just a message from me, your friend” and “not a press release.” She says her words may not be “as clear as I’d like to be” because she’s “hoping not to violate any ethics rules.”

A Justice Department spokeswoman didn’t immediately respond to a request for comment.

In last week’s hearing, Fabian appeared to be arguing that toiletries and related items or services might not be required to meet a condition of “safe and sanitary” in all circumstances, such as if a detainee were only staying in a facility for a matter of hours. But any nuance seemed to be lost on the exasperated judges seen in the video as well as viewers on social media.

Fabian does not directly explain the reasons or legal strategy behind the arguments she made in her testimony but said such an explanation would not be worthwhile. “I get that defending myself by parsing out a technical legal position won’t change most people’s minds,” Fabian writes. “I wouldn’t be permitted to do so anyway, so I won’t try.”

Concern and indignation over U.S. Customs and Border Protection’s handling of children and other migrants has been mounting in the wake of disclosures about the conditions in some facilities including allegations that some children had been denied clean clothes, showers and other necessities.

On Tuesday, acting CBP Commissioner John Sanders announced he was resigning, although his letter to agency employees did not explicitly mention a reason. Trump said in the Oval Office on Tuesday that he was “very concerned” about conditions at facilities for migrant detainees, although he contended that they were treated better under his leadership than under former President Barack Obama.

Vice President Mike Pence has also weighed in, telling CNN on Sunday that “of course” detained children should have access to soap and toothbrushes.

Fabian, as a Justice Department attorney, has found herself before in the position of defending the administration in court amid controversies over its treatment of immigrants detained after entering the U.S. illegally. Last year she defended the administration’s policy of separating migrant children from their parents by arguing it had occurred by necessity and “not for the purpose of deterrence.”