Police and prosecutors give "tacit encouragement" to so-called "paedophile hunter" groups, the UK's highest court has heard.
The Supreme Court was told "huge numbers" of cases were prosecuted based on information from such organisations.
The judges are being asked to consider whether prosecutions based on these operations breach human rights.
The case has been brought by Mark Sutherland who was caught by a group called Groom Resisters Scotland.
In 2018, Sutherland, 37, matched up on Grindr with someone who, when he communicated with them, claimed to be a 13-year-old boy.
He sent sexual messages and images to the person and they later arranged to meet at Partick Bus Station in Glasgow.
In reality, the person Sutherland was communicating with was not a child, but a "decoy" - a member of Groom Resisters Scotland.
The group confronted Sutherland at the arranged meeting, broadcasted the encounter on social media and handed the evidence to the police.
He was convicted in August 2018 of attempting to communicate indecently with an older child, and related offences, and jailed for two years.
He had previously been jailed for sending explicit pictures to a 12-year-old boy.
Sutherland argues that his right to a private life, enshrined in Article 8 of the European Convention on Human Rights, had been breached.
At Wednesday's hearing, his lawyer Gordon Jackson QC, said: "The police are aware that there a number of hunter organisations operating in Scotland and the UK and evidence submitted from these organisations has led to a number of criminal investigations and convictions."
There is "disquiet" about the work of such groups, he said.
Mr Jackson argued that "a huge number" of cases were prosecuted on the basis of information from these organisations.
"What we have is tacit encouragement of these groups," he said.
Alison di Rollo QC, Solicitor General for the Crown Office and Procurator Fiscal Service, Scotland's prosecution service, which is opposing the appeal, argued that the criminal prosecution of sexual conduct between an adult and a child "does not engage" someone's rights to privacy.
"There is no right to respect for such behaviour in a democratic society," she said.
Ms di Rollo said it was clear the "overriding duty" of the police was "to respond to any report of any identified person who may pose a sexual risk to children".
She said there was guidance which set out "the risks, the activities, the undesirability of the activities of these groups" but regardless of the source of evidence, the usual high standards of investigation were required.
She also said members of paedophile hunter groups were themselves liable to criminal prosecution if they broke the law.
The Supreme Court judges are expected to deliver their ruling at a later date.
The case before the Supreme Court justices is very important as the law surrounding the activities of "paedophile hunters" is currently unclear.
Yet according to HM Inspectorate of Constabulary in Scotland (HMICS) almost half of online grooming cases result from the activities of vigilante groups.
The inspectorate said these groups are unregulated and untrained, and in its report in February 2020 said: "A more robust proactive capability on the part of Police Scotland would reduce the opportunities for these groups to operate."
Although Mark Sutherland was convicted by a jury at Glasgow Sheriff Court, a later case in Dundee was thrown out because evidence gained by a vigilante group was ruled "inadmissible."
In that case the sheriff said the means used to induce the accused, known only as PHP, into engaging in an exchange of messages amounted to "fraud".
PHP's lawyers said the vigilantes' activities interfered with his rights under ECHR Article 8 and using their evidence in any trial would mean the court was acting "incompatibly" with those rights.
They also argued the use of information gathered covertly was unlawful under legislation designed to ensure the surveillance of a person was properly regulated.
Those arguments were rejected by the sheriff, but he said by pretending falsely to be young children, the vigilantes had acted unlawfully.
The case at the Supreme Court is being watched carefully by England's Director of Public Prosecutions who has been granted "intervener" status.
The judgement, which will be issued later, will provide a definitive answer to the question of whether undercover vigilante activity is legal, and compatible with human rights, even of those who seek to abuse children.