For the last year or so, the music industry has been buzzing with optimism that its fortunes have finally begun to turn around after more than a decade of digital disruption and plunging sales. Now it has proof.

On Thursday, the Recording Industry Association of America, the trade group that represents the major labels, reported that music sales in the United States generated $7.7 billion in retail revenue in 2016, up 11.4 percent from the year before. That is the industry’s highest sales figure since 2009 and its best percentage gain since 1998.

The increase is largely the result of online streaming, which is rapidly eclipsing all other forms of consumption. Streaming contributed $3.9 billion in 2016, up 69 percent from the year before, and now makes up 51 percent of the business — the first time it has had a majority of sales in the United States.

The largest and fastest-growing chunk of the streaming business is in paid subscriptions to services like Spotify and Apple Music. In the United States, services like these attracted an average of 22.6 million subscribers and generated $2.3 billion, nearly doubling their total from the year before. Spotify has said that it has 50 million subscribers around the world, and Apple Music has more than 20 million.

Other kinds of streaming made up the rest of the format’s total, as the business has evolved to offer consumers a diverse menu of free and paid plans. This year, the industry association attributed $220 million to a new category, “limited paid-tier subscription,” which includes plans like Amazon Prime that let paying customers pick from a smaller pool of songs.

But the music business has bled too much to celebrate without reservation.

“As excited as we are about our growth in 2016, our recovery is fragile and fraught with risk,” Cary Sherman, the industry association’s chief executive, wrote in an online commentary accompanying the report.

Even with the latest growth spurt, sales revenue in the United States is still about half what the industry enjoyed in 1999. That was the year that represented the peak of its most profitable product, the CD, as well as the start of its long digital disruption through the arrival of Napster.

CD sales are now plunging rapidly. Last year, just 99.4 million full-length CDs were sold in the United States, worth $1.2 billion; it was the first time since 1986 that fewer than 100 million were sold. And downloads were down 22 percent last year to $1.8 billion.

Mr. Sherman noted those challenges, but for the second year in a row he devoted most of his blog post to the industry’s crusade against YouTube. That video site remains a vital promotional outlet, but the music industry asserts that it pays too little in royalties and exploits loopholes in copyright laws.

Free services like YouTube, which let people choose which song to listen to, generated $469 million last year, up 26 percent from the year before. (YouTube also has a paid subscription version.)

But Mr. Sherman’s critique is a sign that the industry is still focused on YouTube as an adversary, the way it was on Napster, which in its original form paid nothing in royalties. After years of fighting piracy, the industry is now trying to wring as much money as it can from digital music, and finally seeing growth.