Apple Inc.’s refusal to help the FBI search the iPhone of a terrorist has added pressure on Congress to balance the needs of privacy and law enforcement in encrypted communications — something it has tried but failed to do for years.

Senator Tom Cotton, a Republican from Arkansas, said Apple’s response means "they are unwilling to compromise and that legislation is likely the only way to resolve this issue."

A federal judge on Tuesday ordered Apple to help the U.S. Federal Bureau of Investigation gain entry into an encrypted iPhone used by Syed Rizwan Farook. Farook, along with his wife, shot and killed 14 co-workers in San Bernardino, California, in December, before they were killed by police. The FBI wants to know where they had been and who helped them. Apple is refusing to cooperate.

"These complex issues will ultimately need to be resolved by Congress, the administration and industry, rather than the courts alone, since they involve important matters of public policy," said Representative Adam Schiff of California, the top Democrat on the House intelligence committee.

There are two main legislative efforts taking shape in Congress to resolve the long-term standoff over encrypted communications. Republican Representative Michael McCaul of Texas, chairman of the House Homeland Security Committee, and Democratic Senator Mark Warner of Virginia plan to introduce legislation to create a federal commission to study the issue and make recommendations.

Separately, the top Republican and Democrat on the Senate intelligence panel -- Richard Burr of North Carolina and Dianne Feinstein of California -- are considering legislation that would compel companies to assist law enforcement. They haven’t put forward a proposal yet or indicated when they will do so.

“The U.S. attorney should be able to fully investigate the San Bernardino terrorist attack that killed 14 Californians, and that includes access to the terrorist’s phone," Feinstein said in a statement. "It’s not unreasonable for Apple to provide technical assistance when ordered by the court.”

Manhattan District Attorney Cyrus Vance Jr. and New York City Police Commissioner William Bratton also called on legislators to take action to ensure agencies can access encrypted data.

"This is eventually going to require more significant court rulings and definitely legislation," Bratton told reporters during a press conference Thursday.

The outcome of the Apple dispute will "have a drastic effect on criminal cases across the country," Burr said in an opinion article published by USA Today.

"Apple exists as a corporate entity with the protections provided by U.S. laws, but it cannot be allowed to pick and choose when to abide by those laws as it sees fit," Burr said. "We are a country of laws, and this charade has gone on long enough. Apple needs to comply with the court’s order.

The government’s attempt might create "a dangerous precedent" and "force U.S. technology companies to actually build hacking tools for government against their will," said Democratic Senator Ron Wyden of Oregon, who serves on the intelligence committee and is expected to lead resistance to broad legislation.

"Furthermore, this move by the FBI could snowball around the world," Wyden said. "Why in the world would our government want to give repressive regimes in Russia and China a blueprint for forcing American companies to create a backdoor?"

Meanwhile, Republican Senator Chuck Grassley of Iowa, chairman of the Senate Judiciary Committee, criticized the White House for failing to put forward proposals of its own.

"The administration’s current posture appears to have encouraged at least one technology provider to go out of its way to refuse to assist law enforcement even in circumstances where it once helped to provide lawful access to encrypted devices in response to court orders," Grassley wrote in a letter to FBI Director James Comey.

The FBI wants Apple to provide a software program that would only unlock Farook’s phone. However, the software doesn’t exist and, if developed, would essentially create a backdoor that could be used by foreign governments, criminals and hackers to break into many other phones, said Tim Cook, chief executive officer of Apple.

"We can find no precedent for an American company being forced to expose its customers to a greater risk of attack," Cook said a letter to customers. "The implications of the government’s demands are chilling."

While Apple and the U.S. face what is likely to be prolonged legal battle, critics say the standoff over access to encrypted data has far broader implications than just one court case and needs to be resolved.

"Despite many invitations from law enforcement groups to work collaboratively, these technology companies are spending their lobbying resources on fighting congressional efforts to make it easier for law enforcement to conduct investigations," Reynaldo Tariche, president of the FBI Agents Association, said in a statement.

The group "is encouraging Congress, the president, and other officials to demand that these companies fulfill their legal and civic obligation," Tariche said.