NEW YORK-- Grooveshark, an early leader in music streaming that enraged major labels by letting users upload copyrighted songs, abruptly shut down late Thursday after years of litigation.

Amid the rapid growth of streaming services such as Spotify that cooperate with the music industry, Grooveshark's website went dark as the company avoided potential penalties in the hundreds of millions of dollars.

Grooveshark, which claimed 30 million monthly users, said in a message on the site that it had reached a settlement with the three major record label conglomerates to cease operations immediately and hand over copyrighted song files.

"We started out nearly 10 years ago with the goal of helping fans share and discover music," the message said.

"But despite best of intentions, we made very serious mistakes. We failed to secure licenses from rights holders for the vast amount of music on the service.

"That was wrong. We apologize. Without reservation," it said.

Avoiding massive penalties

Grooveshark was founded in 2006 by three students at the University of Florida in one of the first sites that, in effect, allowed users to listen to music on-demand for free.

Grooveshark's young, entrepreneurial spirit brought frequent media comparisons to Facebook with one founder who left the company, Colombian-born Andres Barreto, sometimes called the Latin Mark Zuckerberg.

Grooveshark allowed users to upload songs, which were often protected by copyright, to which others could listen.

The site eventually reached agreements with some independent labels but faced a string of lawsuits from the three major conglomerates -- Universal, Sony and Warner Music.

Grooveshark's future prospects turned bleak in September when a federal judge, Thomas Griesa, ruled that the site's bosses had actively encouraged employees to upload song files, even ones that were previously taken down due to copyright concerns.

The labels and Grooveshark reached the settlement to avoid a jury trial in New York.

Had the trial gone forward, Grooveshark's executives -- Sam Tarantino and Josh Greenberg -- could have been held liable for a crushing $736 million. Griesa planned to tell jurors that each of the 4,907 allegedly infringed songs carried up to $150,000 in damages.

The Recording Industry Association of America confirmed that Tarantino and Greenberg, whose parent company of Grooveshark is called Escape Media Inc., reached a settlement with the major labels.

Greenberg and Tarantino agreed to pay "significant financial penalties" if they violate the terms, the industry association said.

"This is an important victory for artists and the entire music industry," the group said in a statement, adding that the decision "ends a major source of infringing activity."

Rapid growth of streaming

Since Grooveshark's inception, streaming has become increasingly mainstream. Industry leader Spotify, based in Sweden, launched in 2008 and now claims 60 million users, with 15 million paying for advertisement-free service.

Spotify's free level has been controversial among artists, most notably pop superstar Taylor Swift who last year abruptly pulled her catalog from the site.

But even critics acknowledge that Spotify, unlike Grooveshark, abides by label guidelines on licensing.

Other mainstream streaming sites include Deezer, Google Play, Rhapsody and Tidal, which rap mogul Jay Z bought as he eyes a slice of the booming sector.

Spotify CEO Daniel Ek, responding last year to Swift's criticisms, said that his company had paid back $2 billion in royalties and countered that the alternative would be for fans to go to "pirate" sites such as Grooveshark.

Grooveshark had long rejected claims of piracy. But in the statement announcing its end, Grooveshark encouraged its users to go to licensed streaming services.

Grooveshark said that it believed it served a purpose but that there were "now hundreds of fan-friendly, affordable services."

The demise of Grooveshark has parallels to Napster, a sharing platform for audio files that rocked the music industry in the late 1990s.

Napster's original version shut due to a court injunction in 2001, around the same time that Apple launched its iPod with licensed digital files.