Liam Murray was 19 at the time when he had sex with the girl in his car in a car park on an unclassified road between Duns and Gavinton on February 20 last year.
The offence came to light when the 14-year-old told a member of staff at Berwickshire High School that she was in a sexual relationship with Murray.
Tessa Bradley, prosecuting, said the girl initially denied to police there was a sexual nature to their relationship. But she later disclosed to a relative she had been having sexual activity with Murray and the girl’s mother found out and the police were contacted again.
Ms Bradley said: “She was interviewed on March 15 and said she had earlier denied it because she did not want to get the accused in trouble.
“She confirmed she had indeed been involved in a consensual sexual relationship with the accused. She confirmed that at the time he was aware she was only 14.
“A number of text messages were recovered from the complainer’s mobile phone in the course of which they appeared to be discussing sexual matters and saying that they needed to be quiet about what was going on.”
Murray, of Law View, Preston, near Duns, initially denied any wrongdoing, but later admitted they had sex in his car.
He made no reply to caution and charge.
He pleaded guilty to having sex with the girl when she was 14 and inducing her to perform a sex act on him.
Sheriff Derrick McIntyre deferred sentence until May 2 for a criminal justice social work report to be compiled and ordered that Murray’s name be placed on the sex offenders’ register.