A jury determined Tuesday that Apple used software updates to improve its original iPod rather than unfairly dominate the music market, freeing the consumer electronics giant from a class-action lawsuit that had hung around its neck for nearly a decade.

The long-winding case was decided in a mere three hours by the jury. The plaintiffs had accused the electronics giant of violating antitrust laws when it sent software updates between 2006 and 2009 that prevented songs, sold at lower prices, from playing on the iPod. The suit, which went to trial earlier this month, called on Apple to pay $350 million in damages, an amount that could have been tripled if the jury decided Apple had run afoul of antitrust laws.

In court, Apple argued that the software was designed to keep the product secure from outside files that could have infected the devices. On Tuesday, the company welcomed the verdict in a statement.

“We thank the jury for their service and we applaud their verdict,” the company said. “We created iPod and iTunes to give our customers the world’s best way to listen to music. Every time we’ve updated those products — and every Apple product over the years — we’ve done it to make the user experience even better.”

The plaintiff’s lawyers did not respond to a request for comment.

The lawsuit began to unravel for the plaintiffs when Apple challenged whether any of the two named plaintiffs in the case bought the correct device during the appropriate time period.

The judge eventually allowed another member of the class — Barbara Bennett of Marshfield, Ma. — to be flown out from Massachusetts to the Oakland, Calif. courtroom as a replacement. But she did not testify during the trial. The scramble to find a new named plaintiff, in the end, did not change the jury’s mind.

The case was also notable because it contained video-taped testimony from Apple’s former chief executive Steve Jobs, which was recorded just months before his death in 2011. In it, Jobs said that Apple was “very scared” that hackers would crack its iPod system -- something that would damage Apple’s carefully negotiated contracts with major recording labels to get music for the iPod in the first place.