A class-action lawsuit was filed against Apple on Wednesday for deleted songs from iPods that were downloaded from rival music services from 2007 to 2009.

The case was discussed in U.S. District Court in Oakland Calif., where attorney Patrick Coughlin said the tech giant would put up an error message whenever a user who downloaded songs from a competing music service tried to sync their iPod to their iTunes library. The message would tell the user to restore the device to factory settings, according to The Wall Street Journal. The attorney added that the music from rival companies would disappear when the settings were restored, and that Apple kept the system from informing the user about the issue.

The plaintiffs, who view Apple's actions as a way to avoid competition, are looking to get $350 million in damages, arguing that they had to pay more for iPods because of what the company did.

Apple security director Augustin Farrugia argued that the removal of non-Apple music was aimed at protecting users from getting hacked, as the company was worried about the system being tampered with by hackers, some of which had names like "DVD Jon" and Requiem."

"The system was totally hacked," Farrugia said.

Emails from late Apple co-founder Steve Jobs were shown in the case as examples of the company's concern with hacking, The Wall Street Journal reported.

"Someone is breaking into our house," Jobs said in one of the emails, referring to music pirates.

Farrugia told the court that Apple didn't provide more details about its reasons for deleted non-Apple music because providing users too much information was unnecessary, adding "We don't want to confuse users."

The case continues with Cue and Phil Schiller, head of marketing at Apple, expected to present their cases this week.