More than 1,300 convicted sex offenders could be able to claim compensation from the Scottish government after a landmark hearing in Edinburgh.
The case was brought by a sex offender known as Mr A, who was convicted 17 years ago while he was still a child.
The Court of Session in Edinburgh ruled his human rights were breached by a requirement to remain on the sex offenders register for life.
The court awarded Mr A £1,000 in compensation from the government.
The government agreed to change the sex offenders register laws following a separate UK Supreme Court ruling.
Having served four years' detention, Mr A was placed on the sex offenders register and ordered to report regularly to police for the rest of his life.
He appealed against the reporting requirement, arguing there was no prospect of a review of the order, even if the risk he posed to the public diminished.
At a hearing at the Court of Session earlier, the government accepted that an order for Mr A to report to police for the rest of his life did not allow him to appeal if he posed less of a risk to the public
That appeal was rejected, but in a separate case before the UK Supreme Court, judges ruled that keeping an offender on the register for life was incompatible with the Human Rights Act.
As a result, the Scottish government was forced to amend the sex offenders legislation in October, allowing offenders to challenge the restrictions placed on them by the courts.
Outside the Court of Session in Edinburgh, Mr A's solicitor Tony Kelly said many others may be in the same position.
Mr Kelly said: "There are going to be lots of people thinking about the affect this is going to have on their particular circumstances, lots of people who are in a similar boat and will similarly be able to challenge the particular application of these provisions to them.
"Those who are subjected to the indefinite notification requirement can take forward the challenge on similar terms."