A Twitter logo on a sign at the company's headquarters in San Francisco. (Josh Edelson/AFP/Getty Images)

The federal government’s effort to root out an anonymous critic of President Trump’s immigration policies has sparked an investigation into whether officials abused their authority by demanding that Twitter reveal the identity of one of its users, according to a letter released Friday.

The Twitter account was part of an explosion of anonymous online criticism of Trump that began shortly after his inauguration in January and appeared to emanate from within many federal agencies. The Department of Homeland Security’s effort to identify the user behind one of these accounts — @ALT_uscis, which uses the acronym for U.S. Citizenship and Immigration Services — prompted a summons to Twitter demanding that the company reveal the identity of the user, who was thought to be a federal employee.

The March 14 summons provoked a lawsuit from Twitter and sharp criticism from privacy advocates. Amid this backlash, federal officials rescinded the summons, and the company dropped its suit, appearing to resolve the case.

But DHS Inspector General John Roth decided to investigate possible abuse of authority in this case, as well as “potential broader misuse of summons authority” within the department, he wrote in a letter Friday to Sen. Ron Wyden (D-Ore.), who had called the effort to unmask the Twitter user a “witch hunt.”

Roth said his office had determined that the @ALT_uscis account had not revealed classified information. The letter also said Roth’s office did not play any role in efforts to determine the identity of the Twitter user because of rules intended to “ensure that our work does not have a chilling effect on individuals’ free speech rights.”

The USCIS and Customs and Border Protection are both part of the Department of Homeland Security. They have been on the front lines of Trump’s politically charged efforts to limit immigration, a key campaign promise.

The @ALT_uscis account notes on its Twitter page that it does not represent the views of the department or the USCIS but instead provides “immigration resistance & everything else resistance, snark, humor, sarcasm.” Its list of followers, which was more than 32,000 before news of the Twitter lawsuit, now tops 193,000. It has tweeted more than 10,000 times.

The Supreme Court has ruled that the First Amendment protects the right to speak anonymously or while using a pseudonym, as many of the Founding Fathers did in their writings. To defend their summons to Twitter, DHS officials would have had to demonstrate that the user behind the @ALT_uscis account had probably committed a crime.

DHS spokeswoman Jenny L. Burke declined to comment on the pending investigation, saying department officials will respond directly to the inspector general.

Wyden expressed support for the investigation in a statement Friday. “The summons raised serious concerns about improper political use of CBP’s summons power to squash free speech.”

Twitter did not respond to a request for comment.

Correction: A previous version of this story incorrectly stated USCIS is part of Customs and Border Protection. In fact, the two divisions are separate entities within DHS

Follow The Post’s tech blog, The Switch, where technology and policy connect.