Lee Williams, 19, admitted the offence, which took place after the two met at the Trocadero centre in Piccadilly Circus. But he said that he had not been aware that the girl was below the age of consent.
Judge Simon Goldstein told the Old Bailey: "Perhaps I am out of date, but however sophisticated she may try to be, I don't believe a child should be going to the Trocadero at two in the morning, as so many of them do these days."
He accepted Williams' defence that the girl's looks and behaviour made her appear older. "You and I both know that had I come to the conclusion that you had known that she was only 12, you would not be walking free," he told him.
Earlier, the jury watched a video of the girl giving evidence against Williams, from south-east London.
Williams told the court that he met the girl when she was 11 and he was 18. "She told me she was 16 and she convinced me she was at college," he said. "If I had known her real age, I would have had nothing to do with her."
The girl's mother told the judge that she was a "typical 12-year-old" who had been exploited by Williams. However, Judge Goldstein said: "I am not stupid enough to think that because she looks sweet on the video, she could not look much older at 11 o'clock at night at the Trocadero."
The relationship between the two began in September 1997 and came to light after the girl's mother discovered a used condom in her bedroom at their home in Walthamstow, east London.
Williams, who has just completed a sentence at Feltham Young Offenders' Institution for a driving offence, was ordered to sign the sex offenders' register and to attend counselling sessions.Reuse content