Apple is no longer allowing U.S. law enforcement agencies to take advantage of an iPhone security vulnerability that they hack into when carrying out investigations in cases involving iPhone owners. 

The New York Times reported Wednesday that the Cupertino giant is planning to eliminate the vulnerability and close the technological loophole that taints the image of the iPhone as a secure device that only its owner can open. 

The news comes two years after Apple refused to help authorities open a locked iPhone of a mass killer. The move stirred up a serious debate over user data security policies and why law enforcement agencies should not be allowed to circumvent them. 

The F.B.I eventually decided to not get assistance from Apple, and instead turned to a third party to unlock the device. This has since led other agencies to employ the same technique whenever they come across cases that need personal data from locked iPhones. 

The idea that Apple is getting rid of the vulnerability was immediately criticized by some law enforcement agencies, according to Bloomberg. It has also reignited the debate on whether or not law enforcement agencies have the right to gain access to locked iPhones of suspected criminals. 

An Apple spokesperson has defended the tech giant’s decision in a statement, saying, “We’re constantly strengthening the security protections in every Apple product. We have the greatest respect for law enforcement, and we don’t design our security improvements to frustrate their efforts to do their jobs.”

Privacy advocates are backing Apple for doing what needs to be done, and that is to fix a security flaw that could be exploited by other people. They maintain that if such a vulnerability continues to exist, private information could be easily leaked out to the public. 

Apple has been implementing some changes lately in an attempt to prevent a controversy just like Facebook’s Cambridge Analytica scandal to hit its business. Last week, Tim Cook’s company updated its App Store guidelines to limit third-party developers’ access to contact information stored on iPhones.