Apple appears to be headed toward a legal battle with the Trump administration over its refusal to create a so-called "backdoor" that would let the FBI crack encryption on devices like the iPhone.

The administration has said it needs that access so it can "better protect the lives of Americans and prevent future attacks."

But privacy advocates have said that the bigger threat to public safety is weakening the security of people's devices, which could also let in bad actors.

Apple has defended its position for the same reason, saying that "backdoors can also be exploited by those who threaten our national security and the data security of our customers."

Visit Business Insider's homepage for more stories.

Apple and the US government reignited an ongoing debate over privacy and public safety this week following the company's refusal to create so-called "backdoor" that would let the government crack encryption on devices like the iPhone.

Last week, the FBI asked Apple for help unlocking two iPhones connected to a mass shooting in Florida. After Apple declined, Attorney General William Barr held a press conference where he argued that access to encrypted data is "critical" to helping law enforcement "better protect the lives of Americans and prevent future attacks."

But privacy advocates think that the government has it backwards.

"It's not some simple trade-off that somehow increases national security at the cost of one person's individual privacy," Alan Butler, general counsel for the Electronic Privacy Information Center, told Business Insider.

Butler said the bigger threat is weaker encryption, which could make it easier for bad actors to access people's devices in addition to law enforcement. The very point of encrypting a device is to provide its user with increased security, he said, whether that means protecting their financial information against cyber theft or safeguarding their home against physical theft.

"People have apps on their phones that control the security systems in their homes," Butler said, adding, "What's more unsecure than a criminal being able to unlock your phone and therefore literally unlock your front door?"

Other privacy and civil rights advocates echoed that argument, pointing to types of bad actors beyond just cyber criminals.

"There is simply no way for Apple, or any other company, to provide the FBI access to encrypted communications without also providing it to authoritarian foreign governments," the American Civil Liberties Union said in a statement to Business Insider.

Electronic Frontier Foundation general counsel Kurt Opsahl agreed, telling Business Insider in a statement that the FBI's request "imperils millions of innocent Americans and others around the globe, and is a poor trade-off for security policy."

Apple has defended its position on similar grounds.

"We have always maintained there is no such thing as a backdoor just for the good guys. Backdoors can also be exploited by those who threaten our national security and the data security of our customers," the company said in a statement to Business Insider.

It's also not the first time Apple has made this stand. The current debate is effectively a replay of a 2016 struggle between Apple and the Obama administration, which wanted to access a cellphone after the mass shooting in San Bernardino, California. The government ended up taking Apple to court over the issue, though it ultimately dropped the case after a private company offered to help it hack the phone.

In the years since then, cyberattacks have been on the rise, something Apple will likely point to as it gears up for another potential legal battle with the government.