Dambulla Magistrate severely warned the three youths who were remanded for taking semi-naked photographs on Pidurangala and posting them on social media and released them.
When the case was taken up before the court today, the hikers pleaded guilty to their offence.
This ended a case that grabbed headlines over the past few weeks as it sparked a fierce debate in the legal circles over the legal grounds of their police arrest and the subsequent prosecution.
The three post A-level hikers were arrested after a strong public outcry against their act.
The Police launched an inquiry into the incident under a directive from Prime Minister Ranil Wickremesinghe.
The lawyers appearing for the youth said they could not be prosecuted under the Archeological Act.