Sean Hogg, 21, was found guilty of raping a teenage girl at Dalkeith Country Park in Midlothian, Scotland, when he was 17 years old.
Judge Lord Lake said he had to take Hogg's age into account when sentencing him, meaning he has avoided jail and will have to carry out 270 hours of unpaid work.
The sentencing has sparked outrage among those in the legal and political profession, with Rape Crisis Scotland's CEO Sandy Brindley describing the sentencing as "worryingly lenient".