Memory loss fail-safe system
The memory loss fail-safe system was a defense built into the programming of Lieutenant Commander Data. In the event of a memory loss, it was intended to protect the android from anyone who might try to take advantage of him.

In such an event, Data's ethical and moral subroutines would take over all his basic functions. Effectively, he would enter a self-preservation mode in which he only knew right and wrong.

The system was activated in 2375 when some of Data's memory engrams, located within his positronic matrix, were damaged by a Son'a weapon on the Ba'ku planet. (; )
Computer programming