The boy’s mother left the boy at their rural Donegal home with his siblings while she went out for a couple of hours.
She gave her son her mobile phone in case he needed it.
The boy downloaded the Gaydar app and put up a profile of himself claiming to be 19.
A man contacted the child a short time later and was told the boy’s mother would be out for two hours.
The man, who was aged 30 at the time, arranged to travel to the boy’s home.
He showered and drove there.
The man has appeared at Letterkenny Circuit Court where he pleaded guilty to the defilement of a child under the age of 15 years.
The offence occurred on April 13th, 2015.
Garda Malcolm Hooks told the court that while the boy’s Gaydar profile said he was aged 19, another part of his profile read: “I’m not a porn star, I’m a 13-year-old.”
The garda said that when the boy was interviewed by specialist interviewers, he claimed that the man forced him to give him oral sex.
The boy’s mother came home unexpectedly and witnessed the sexual encounter.
In a later interview with gardaí, the man admitted that when the boy answered the door to him, he thought he was aged “16 or 17”.
The accused man’s sister gave evidence that, up until this incident, her family never knew he was homosexual.
She added he is deeply ashamed of what had happened and is willing to accept any punishment that came his way.
Colm Smyth, defending, said his client is from a very respectable family who is shocked by what had happened.
He said a report from a forensic clinical psychologist found the man to be immature and introverted and that he has difficulty recognising his bisexuality.
However, the psychologist added that he found no evidence of any interest in paedophilia.
The man told the psychologist: “I’m not that kind of person and I’m disgusted with myself. If I can fix this in any way, I will.”
Judge John Aylmer adjourned the case to hear evidence from the boy.