SAN FRANCISCO — Last month, the federal government issued a summons ordering Twitter to hand over information about an anonymous account that had posted messages critical of the Trump administration. Now, the government has blinked.

Customs and Border Protection on Friday withdrew its demand that Twitter unmask the anonymous account, a day after the social media company sued the government to block the summons. The person or people behind the account, @ALT_USCIS, had claimed to be a current employee of Citizenship and Immigration Services and had regularly posted messages at odds with White House policy.

The government’s move defused a potential standoff pitting a presidential administration that has tried to clamp down on leaks against a technology company with a history of defending its users’ First Amendment rights.

“Because the summons is now withdrawn, Twitter voluntarily dismisses without prejudice all claims against Defendants in the above-captioned matter,” Twitter said in a court filing on Friday in which it withdrew its lawsuit against the government.