WASHINGTON - The Supreme Court on Wednesday limited the amount of damages that those who possess child pornography must pay victims, throwing out a $3.4 million award that went to a woman whose childhood rape has been widely seen on the Internet.

The court voted 5-4 that those convicted of possessing child pornography must pay restitution to victims. But it said the amount of damages paid must be proximate to the harm that a specific offender has caused.

The case before the court involved a Texas man, Doyle Randall Paroline, who pleaded guilty to possessing 300 images of child pornography, including two of a girl identified in court documents as "Amy Unknown" when she was 8 or 9. An appeals court had said Paroline was liable for all of the $3.4 million in damages that Amy, now an adult, was owed for psychological damage and lost income after she discovered the images.

All nine justices in Paroline v. United States indicated that the law Congress passed requiring restitution to victims of child pornography was flawed. Several called for a rewrite that would provide more precision and guidance.

Justice Anthony M. Kennedy, who wrote the majority opinion, noted that his approach "is not without difficulties."

"But courts can only do their best to apply the statute as written in a workable manner, faithful to the competing principles at stake: that victims should be compensated and that defendants should be held to account for the impact of their conduct on those victims," he wrote.

At the same time, he said, courts must assure that defendants are liable only "for the consequences and gravity of their own conduct, not the conduct of others."

Kennedy said there were three options: give Amy nothing, because it is impossible to decide how Paroline's possession of two images affected her; make Paroline liable for all damages; or take the middle ground.

Kennedy was joined by Justices Ruth Bader Ginsburg, Stephen G. Breyer, Samuel A. Alito Jr., and Elena Kagan.

Chief Justice John G. Roberts Jr. "regretfully" dissented, and said a proper reading would mean Paroline should pay nothing.

"The statute as written allows no recovery," wrote Roberts in a dissent joined by Justices Antonin Scalia and Clarence Thomas. "We ought to say so, and give Congress a chance to fix it."

Justice Sonia Sotomayor also dissented, but in the opposite direction, saying Paroline and every other defendant should be liable for all of her loss. Under that scenario, Amy would get no more than the total $3.4 million, but it might be easier to collect if one defendant was wealthy enough to pay it all.

Courts have estimated damages in lost income and counseling costs at nearly $3.4 million, but they have been collected in a piecemeal manner.

Amy's attorney, Paul Cassell, said it had taken 41/2 years to collect $1.75 million, from 182 defendants ($1.2 million from one man).

"As Amy has recognized, the Supreme Court's split-the-difference ruling promises her that she will receive full restitution 'someday,' " he wrote. "I just wonder how far in the future that someday will be."