Marco della Cava, and Jessica Guynn

USA TODAY

SAN FRANCISCO — Tech giants are gathering in Apple's corner over the Silicon Valley giant's battle with the federal government.

Google, Facebook and Twitter are part of a coalition that will file unsolicited amicus briefs on behalf of Apple. Microsoft declined to comment on whether it was part of a group or would file separately, but Microsoft president Brad Smith told Capitol Hill lawmakers Thursday that his company would file an amicus brief. Smith said Microsoft "wholeheartedly supports Apple" in its tug of war with the FBI, which wants Apple to create a back-door entrance to the iPhone of one of the shooters in the San Bernardino massacre.

The joint amicus brief or multiple briefs are expected to be filed next week, according to representatives from the other three companies. A Twitter spokesperson confirmed the amicus brief news, as did representatives from Google and Facebook who who were not authorized to speak publicly about the matter.

Latest: U.S. vs. Apple over San Bernardino iPhone

Apple CEO Tim Cook has argued that writing code for such a program would jeopardize the security of all its customers. Creating encryption-breaking code "is bad for America," Cook told ABC News anchor David Muir Wednesday, adding that such code would be the "software equivalent of cancer."

Apple filed its motion to vacate on Thursday. The Cupertino, Calif., iPhone maker is arguing that the government is employing too broad an interpretation of the All Writs Act, which can compel companies to turn over consumer information to law enforcement, and asking it to write code that violates its own corporate views on privacy and security.

Apple plans two-pronged attack in fight with FBI

The Electronic Frontier Foundation is among those planning to file an amicus brief, which refers to an unsolicited "friend of the court" opinion.

"The U.S. government wants us to trust that it won't misuse this power," reads a statement on the EFF's website. "But we can all imagine the myriad ways this new authority could be abused. Even if you trust the U.S. government, once this master key is created, governments around the world will surely demand that Apple undermine the security of their citizens as well."

Also planning to file are the American Civil Liberties Union, whose staff attorney Alex Abdo said in a statement that "the government's request also risks setting a dangerous precedent. If the FBI can force Apple to hack into its customers' devices, then so too can every repressive regime in the rest of the world."

Amnesty International is taking similar action, echoing pro-Apple sentiments from the likes of NSA-data whistleblower Edward Snowden, Facebook founder Mark Zuckerberg and Google CEO Sundar Pichai.

Meanwhile, the public at large appears evenly divided on the matter according to a number of polls. Some support the government's efforts to track terrorists by any means necessary, while others wonder about the slippery slope created by federal officials having unfettered access to personal information.

Smith's testimony made effective use of a prop from a century ago: an adding machine. In noting that the All Writs Act, which has allowed the government to get assistance from private companies in pursuit of criminal activities, was written in 1911, Smith said that the leading technological device in that time "is right here in front of me."

He added, "Put simply, we do not believe that courts should seek to resolve issues of 21st-century technology with law that was written in the era of the adding machine. We need 21st-century laws that address 21st-century technology issues. And we need these laws to be written by Congress. We, therefore, agree wholeheartedly with Apple that the right place to bring this discussion is here, to the House of Representatives and the Senate so the people who are elected by the people can make these decisions."

Follow USA TODAY tech reporter Marco della Cava on Twitter: @marcodellacava