The 7-2 ruling, while not unexpected, was a blow to Internet publishers and others who wanted to make old books available online and use the likenesses of a Mickey Mouse cartoon and other old creations without paying high royalties.
"This ruling helps private creators and companies at the expense of the public's interest in getting free access to copyrighted material more quickly," said CBS News legal consultant Andrew Cohen. "The Court had to balance those competing interests and once again it did so in a way that keeps a lot of information out of the public domain."
Hundreds of thousands of books, movies and songs were close to being released into the public domain when Congress extended the copyright by 20 years in 1998.
Justices said the copyright extension, named for the late Rep. Sonny Bono, R-Calif., was not unconstitutional.
The Constitution "gives Congress wide leeway to prescribe 'limited times' for copyright protection and allows Congress to secure the same level and duration of protection for all copyright holders, present and future," Justice Ruth Bader Ginsburg said from the bench.
A contrary ruling would have cost entertainment giants like The Walt Disney Co. and AOL Time Warner Inc. hundreds of millions of dollars. AOL Time Warner had said that would threaten copyrights for such movies as "Casablanca," "The Wizard of Oz" and "Gone With the Wind."
Also at risk of expiration was protection for the version of Mickey Mouse portrayed in Disney's earliest films, such as 1928's "Steamboat Willie."
Congress passed the copyright law after heavy lobbying from companies with lucrative copyrights.
During the argument in the case last October, some justices seemed bothered by the retroactive extension but they also were concerned about their standing to overturn it.
The Constitution allows Congress to give authors and inventors the exclusive right to their works for a "limited" time.
Congress has repeatedly lengthened the terms of copyrights over the years. Copyrights lasted only 14 years in 1790. With the challenged 1998 extension, the period is now 70 years after the death of the creator. Works owned by corporations are now protected for 95 years.
Justices John Paul Stevens and Stephen Breyer disagreed with their colleagues.
Stevens wrote that the court was "failing to protect the public interest in free access to the products of inventive and artistic genius."
Patents and copyrights are attempts to balance the need to reward innovation, by protecting an inventor's right to profits, against the desire to prevent a monopoly on a particular item from stifling future innovation.
Disputes over how long to protect patents and copyrights concern not just cartoon characters: they also touch on serious policy issues like getting generic drugs to market and providing affordable medicines to the Third World.