SAN FRANCISCO — Litigation is rarely the fastest way to resolve a dispute. But sometimes the threat posed by a lawsuit—and the publicity associated with it—can spur action more quickly than other tactics.

That seems to be in the case in the stand-off between Twitter Inc. and the Department of Homeland Security over the government's efforts to expose the person or or people behind @ALT_USCIS, one of the so-called “alternative agency” Twitter accounts.

One day after suing to block an agency summons, Twitter voluntarily dismissed its complaint Friday, saying U.S. Customs and Border Protection had agreed to withdraw its demand that Twitter disclose the “user names, account login, phone numbers, mailing addresses and IP addresses” associated with the @ALT_USCIS account.