A California judge on Tuesday ordered Apple to help the FBI unlock an iPhone used by one of the San Bernardino shooters - an order that Apple has vowed to oppose, calling it "an overreach by the U.S. government."

Apple CEO Tim Cook argues in a letter signed and published Tuesday that the order would be the equivalent of building a backdoor to the iPhone, which is something too dangerous to create.

"The government is asking Apple to hack our own users and undermine decades of security advancements that protect our customers -- including tens of millions of American citizens -- from sophisticated hackers and cybercriminals," the letter reads.

Such a move would be an "unprecedented step," threatening the security of Apple's customers, the letter continued. "No reasonable person would find that acceptable."

The order comes after Apple received a request from the FBI to unlock the last piece of evidence that is in the bureau's possession, an iPhone 5c belonging to Syed Rizwan Farook, who was killed by police along with his wife, Tahsfeen Malik, after they opened fire at Farook's co-workers at the Inland Regional Center.

The FBI has been unable to unlock the iPhone, and the bureau now risks losing all information on the phone due to an auto-erase function that wipes all data from the device after too many unsuccessful attempts to unlock it, reported The New York Times. Through Apple's help, the FBI would be able to attempt as many numerical combinations as is needed to unlock the phone.

Apple's issue with the order is that it believes the act of it creating a backdoor in this one case would have implications that extend far beyond it.

"If the government can use the All Writs Act to make it easier to unlock your iPhone, it would have the power to reach into anyone's device to capture their data," it said.

"The government could extend this breach of privacy and demand that Apple build surveillance software to intercept your messages, access your health records or financial data, track your location, or even access your phone's microphone or camera without your knowledge."

Apple has helped the FBI in the past, doing everything that is both within its power and within the law to assist them. However, Apple has drawn the line with the request to build a backdoor - a sentiment that is shared by San Francisco-based Electronic Frontier Foundation, which is considering filing an amicus brief in support of the tech giant, according to USA Today.

"If the U.S. government can force Apple to do this, why can¹t the Chinese or Russian governments? Other countries will ask for this same power. Do we want to have this be universal?" said Kurt Opsahl, general counsel for the EFF.

He argues that if Apple creates a program to break into this iPhone, then it could be used as a "master key" for other ones.

"It would be possible for the government to take this key, modify it and use it on other phones," Opsahl said. "That risks a lot, that the government will have this power and it will not be misused."