WASHINGTON — Victims of child pornography whose images of sexual abuse have circulated on the Internet may demand compensation from every person caught downloading and possessing the illegal images, the Supreme Court ruled Wednesday.

But justices set aside a $3.4 million restitution order handed down against a Texas man on behalf of one victim, ruling that a single defendant who possesses the pornography may not be forced to pay the full amount of damages due to the victim.

The 5-4 decision upholds part of the Violence Against Women Act and opens a new chapter in compensating victims who say the online circulation of their images has forced them to relive the sexual abuse they experienced as children.

One such victim, identified in court papers as “Amy,” stepped forward in 2008 to seek compensation after she learned that photos of her child abuse had spread across the Internet.

She was 8 when she was sexually abused by her uncle. He was convicted, sent to prison and ordered to pay $6,000 in restitution.

As an adult, she and her lawyer went to court, citing a provision of the 1994 law that said judges shall order defendants who sexually exploit children to pay the victim “the full amount” of their losses. Amy’s case was the first to reach the high court, and Wednesday’s ruling set out a middle-ground position.

Amy’s lawyers say her losses — for lost income, therapy and legal fees — amount to $3.4 million. She has been granted restitution in about 180 cases and has recovered about 40 percent of what she seeks.

The justices agreed she should receive full restitution for her injuries and pain, but they said she is not entitled to seek the entire amount from Doyle Paroline, of Texas, who pleaded guilty in 2009 to possessing more than 150 images of child pornography, including two that depicted a young Amy.

“It makes sense to spread the payment among a larger number of offenders in amounts more closely in proportion to their respective causal roles and their own circumstances,” Justice Anthony Kennedy said.

His opinion in Paroline v United States leaves it to federal judges to decide on the proper amount in each case.

The Supreme Court sent the case back to Texas and told the judge to set a “reasonable and circumscribed award” for Amy.

Chief Justice John Roberts Jr. and Justices Antonin Scalia and Clarence Thomas dissented, saying Congress had failed to make clear whether defendants such as Paroline were liable for damages, and if so, how judges should determine the amount.

Justice Sonia Sotomayor dissented separately.

Material from The New York Times is included in this report.