Twitter sued the Department of Homeland Security in response to efforts to unmask @Alt_USCIS.

The US Homeland Security Department is investigating the possible abuse of authority in the case to force Twitter to reveal a user critical of President Donald Trump.Emmanuel Dunand/AFP/Getty Images

The US government's effort to unmask an anti-Trump account has sparked an investigation by the Department of Homeland Security (DHS) over the possible abuse of authority. In a letter on Friday, DHS Inspector General John Roth said the agency is conducting an internal investigation into whether the demand sent to Twitter in March by the Bureau of Customs and Border Protection (CBP) was "improper in any way".

Earlier this month, Twitter disclosed that it received a summons in March from the CBP, a division of the DHS, demanding that the company reveal the user names, account login phone number, mailing addresses and IP addresses associated with @ALT_USCIS.

Claiming to be run by a current government employee at the US Citizenship and Immigration Services (USCIS), this account tweeted posts critical of the Trump administration's controversial immigration policies.

Twitter sued the DHS is response, accusing the government of violating the First Amendment, political speech rights and abusing a "limited-purposed investigatory tool". In its summons, the CBP cited a federal law that is typically used to obtain records regarding imported merchandise.

The social media company also argued that the government cannot compel it to reveal information about its users without meeting multiple tests including offering proof that a criminal or civil offense was committed.

Twitter dropped its lawsuit 24 hours after the CBP withdrew its summons. The revelation, however, sparked fierce criticism from Democrats, privacy and civil liberties advocates.

Democratic Senator Ron Wyden from Oregon called for an investigation on 11 April by the DHS inspector general into "who directed this witchhunt".

In his letter to Wyden, Roth said he decided to investigate whether the CBP abused its authority as well as the "potential broader misuse of summons authority" within the agency. His office concluded that no classified information was released via the @Alt_USCIS account. He also clarified that his office did not play any role in efforts to reveal the identity of the Twitter user and only learned of the attempt after it was reported by the media.

"Our investigation protocol includes controls for situations in which First Amendment activity is implicated, and we strive to ensure that our work does not have a chilling effect on individuals' free speech rights," Roth wrote. "I can confirm that DHS OIG is not investigation, and will not investigate, any alleged misconduct on the part of the @ALT_USCIS account owner."

Shortly after the lawsuit was dropped, the @ALT_USCIS account thanked Twitter and the American Civil Liberties Union for "standing up for the right of free anonymous speech". Since then the account has continued to tweet its criticism of Trump's policies. Its follower count has now bumped up to over 193,000 followers, up from 32,000 before Twitter's lawsuit. It has sent out over 10,000 tweets since it was created in January.