A proposal from two senior U.S. senators would force tech companies to give technical assistance to law enforcement agencies trying to break into smartphones and other encrypted devices.

The draft bill, released Friday by Senators Richard Burr and Dianne Feinstein, would allow judges to order tech companies to comply with requests from the FBI and other law enforcement agencies to help them break into devices. Burr, a North Carolina Republican, is chairman of the Senate Intelligence Committee; Feinstein, from California, is the panel's senior Democrat.

"All persons receiving an authorized judicial order for information or data must provide, in a timely manner, responsive, intelligible information or data, or appropriate technical assistance," the draft bill says.

The proposal is likely to be controversial, with many encryption and privacy advocates sure to oppose it.

"This legislation places an unqualified demand on companies to decrypt their customers’ data upon receiving a court order from law enforcement," Daniel Castro, vice president of think tank the Information Technology and Innovation Foundation, said by email. "While companies should comply with lawful requests, it is simply not possible for a company to do so when the customer controls the only keys used to encrypt the data."

Services like WhatsApp, which now uses end-to-end encryption on its messaging app, would not be able to comply unless it modifies its security protections, Castro said.

"Yet, the bill explicitly states that it is not authorizing the government to require or prohibit any specific design changes to software or hardware," he added. "In short, this bill sets up a legal paradox that would further muddy the waters about how and when the government can compel the private sector to assist in gaining access to private information."

Technology companies would be paid for reasonable costs incurred in providing the assistance.

The long-rumored proposal, in the works for weeks, comes after a high-profile court fight between Apple and the FBI over access to an iPhone used by a mass shooter in San Bernardino, California.

The FBI ultimately withdrew its request in that case after saying it found another method for defeating the phone's password protections, but the U.S. Department of Justice said Friday it plans to appeal a judge's ruling against the agency in a New York drug case.