A year ago, a Web site called eDonkey was an arch-nemesis of the music industry. Like other sites with names like Kazaa and LimeWire and the original Napster back in 1999, eDonkey allowed users to swap songs for free over the Internet. Sharing, users said. Stealing, the music industry replied.

This week, Sam Yagan, the inventor of eDonkey, told a Senate Judiciary panel that his site has been forced to do an about-face and start charging its users for songs, a significant victory for the music industry and a radical change for the tens of millions of downloaders who have never paid for a song.

Like Kazaa and a dozen others, eDonkey is a peer-to-peer or "P2P" service, meaning users trade songs for free among each other, rather than downloading them from a main server, as was the case with Napster.

The Supreme Court has forced all P2P services -- most of which sprang up after Napster was shut down by the government in 2001 -- to face a choice: Go legitimate, as the music industry says, shut down, or move outside U.S. jurisdiction. The impact could be enormous: BigChampagne LLC, which measures online media, estimates there are 10 million P2P users online globally at any one time.

The Australia-based Kazaa, the most-used P2P site, claimed more than 820,000 downloads last week and nearly 400 million during its four-year lifespan. But even Kazaa's parent company has been found liable for its users' copyright infringement by an Australian court.

In the new world, eDonkey users will have to start ponying up a yet-undetermined fee for each song, and performers and songwriters will get a cut of that fee in royalties. EDonkey will likely avoid both a crippling lawsuit from the music industry and a shutdown notice from the federal government.

The turnaround is the result of a June Supreme Court ruling that sites such as eDonkey, Kazaa and Grokster are endorsing theft of digital content, such as songs and movies. Emboldened, the Recording Industry Association of America sent out cease-and-desist orders to many P2P sites earlier this month.

Now, sites such as eDonkey -- which tend to be small businesses -- are facing fleets of lawyers with the law on their side.

In the simplest terms, the P2P sites will begin using a filter to keep users from trading copyrighted songs and movies that have not been licensed for sale. This essentially reduces the authorized song-sharing library from millions of songs to hundreds of thousands, about the size of Apple Computer Inc.'s iTunes music store, because many artists and record companies still do not allow digital sales of their songs.

For many, the seismic shift is a business opportunity.

Michael Bebel was the chief executive of the legal version of Napster, launched in 2003. Now, he's the new chief executive of Mashboxx, a Virginia Beach-based company that makes software that pays rights-holders for their works when purchased over a legal P2P network.

"The [cease-and-desist] orders clearly hit their mark," Bebel said at an RIAA-sponsored event at the Cannon House Office Building Tuesday night that showcased authorized file-sharing services. Bebel's boss, Wayne Rosso, was once the head of Grokster. Now, Mashboxx is considering acquiring Grokster.

Where some see opportunity in the wake of the Supreme Court's ruling, though, others see bad news for music fans.

"They're not getting their needs met" by authorized P2P services, said Fred von Lohmann, a lawyer with the Electronic Frontier Foundation, which proposes a blanket-licensing system that would let consumers get music from any service -- authorized or not -- for a monthly fee. The system is opposed by Bainwol, who called it "an excuse for avoiding the central reality that you've got to go legitimate."

For von Lohmann, the legitimization of P2P sites is meaningless unless more artists and record labels allow more of their songs to be sold in digital form.

"We'll still have bad inventory, high prices and restrictions for playing [songs] on your iPod," he said. "The solution to each of those has been in the hands of the record labels from day one."

Or, as Yagan put it on Wednesday: "I cannot fathom how many paid downloads we could have sold on eDonkey if the record labels had granted us licenses to sell their content."