Apple is reportedly developing new security features for its iPhone products that will prevent anyone - including them - from accessing private data stored in the device.

The new safety measures come as federal investigators are battling in court to force Apple to provide access to a cell phone that belonged to one of the terrorists who killed 14 people and hurt 22 in San Bernardino, California on December 2 last year.

News of the new security features were first reported Wednesday by the New York Times, which cited anonymous sources.

Apple is mending security holes in its smart phones that the FBI seeks to exploit, according to reports. Pictured is a protester holding up an iPhone in front of the Fifth Avenue Apple store in New York City during a demonstration Tuesday

Apple CEO Tim Cook said allowing investigators to access the phone used by one of the San Bernardino shooters would set a troublesome precedent

The security hole that Apple is looking to mend, and which the FBI is trying to exploit, is part of a troubleshooting system that allows the company to automatically install software updates on personal phones.

Apple, which has spoken out against the FBI's plans, is being prodded by investigators to install custom-written software on the phone used by one of the San Bernardino shooters in the ISIS-inspired attack.

The software would be installed using the troubleshooting system and allow for investigators to break into the phone.

The SUV driven by the San Bernardino terrorists is shown here riddled with police bullets the day after the December 2 attack

Pictured are the fourteen people who died in the December 2 attack in San Bernardino, California. The FBI is seeking to hack into a phone used by one of the killers, but Apple is fighting the order in court, and reportedly, in its software labs

Apple has until Friday to file its opposition to FBI's court order.

The company says a win for the FBI could set a troublesome precedent.

'If a court can ask us to write this piece of software, think about what else they could ask us to write—maybe it's an operating system for surveillance, maybe the ability for the law enforcement to turn on the camera,' Apple CEO Tim Cook said Wednesday in an interview with ABC News.

'I don't know where this stops. But I do know that this is not what should be happening in this country.'

Experts told the Times that while Apple will likely succeed in fixing security flaws, law enforcement agencies will continue to seek access to private data stored on personal devices.