Anthony Gibson warned his victim that she better have "a good lawyer or stop talking s***" after she revealed to friends and relatives that she had been subjected to a rape ordeal by him.
He sent a string of text messages to the 16-year-old and in one claimed he had been to see the police and informed them that he had not slept with her.
Advocate depute Alison Di Rollo told the High Court in Edinburgh: "There were then a further 10 texts asking why she was saying he raped her. She replied that it was because he had raped her."
Scientific tests later confirmed he was the father.
A judge told Gibson: "You perpetrated a determined rape on a vulnerable teenager who was little more than a child. To make matters worse your act resulted in her pregnancy and necessitated her having to endure the procedures of the termination of the pregnancy."
Lord Turnbull said: "There was no explanation for your conduct beyond your own selfish desire to impose yourself on the young girl."
The judge pointed out that it not even been said he was remorseful or ashamed because he clearly was not.
He told Gibson that he would have faced an eight and a half year sentence for the crime, but it would be reduced following his guilty plea.
The bricklayer denied having sex with the teenager when questioned by police, but after a paternity test was carried out using DNA samples following her termination of the pregnancy he offered to plead guilty to raping her.
Gibson, 23, of Medwin House North, in Edinburgh, admitted raping the girl at a hostel in the city in August this year after attempting to kiss her, pushing her onto her back on a bed, pinning her hands and removing her lower clothing.
The sex attacker, who has previous convictions for assault, had been freed on bail at the time by a sheriff following an allegation of carrying a knife.
Ms Di Rollo told the court that the victim became "severely depressed" following the sex attack and termination. "Shortly afterwards she took an overdose and required admission to hospital for a period of two weeks. She has also suffered panic attacks."
"She has not had a boyfriend since the date of the offence and has no thoughts of having any sort of relationship in the foreseeable future.
She reports she now has trust issues with men," said the prosecutor.
Gibson had been staying at the same hostel as his victim at the time of the crime and was introduced to him by another resident. He invited her to his room and she did not think anything of it as residents often sat about in each others bedrooms.
She later found out that Gibson had told another man that he was going to "shag her".
Gibson was drinking cider, but appeared sober, and sat next to her on the bed and started rubbing her leg. She pushed him away but he said: "I really like you."
He tried to kiss her but she pushed him away again.
Ms Di Rollo said Gibson then pushed his victim back onto the bed and pinned her hands above her head and tried once more to kiss her, but she turned away.
"She told him to stop and get off her but he would not do so. She also told him that she didn't want sex. He said; 'It will be fine'," said the advocate depute.
Gibson then had unprotected sex with the girl. "She kept saying 'stop, stop it, please get off' but he just looked at her," said the prosecutor.
After finishing raping her Gibson "acted as if nothing had happened", according to his victim. He stood beside a mirror and had another drink of cider.
The victim said she was going back to her room. She said she wanted to forget about her ordeal and ran a bath and went to bed after putting her clothes in the washing machine.
The distressed teenager revealed to a friend that Gibson had raped her.
An attempt was made to persuade her to go to the police but she said she wanted to forget about it.
She later disclosed to others that she had been sexually assaulted and Gibson's text messages started arriving. She then went to the police and began to suspect that she might be pregnant.
After it was confirmed she decided to end it. Samples were sent to forensic scientists for analysis. Ms Di Rollo said: "The scientists concluded that the DNA results in this case support the contention that Gibson was the biological father."
Defence solicitor advocate Jim Stephenson said Gibson accepted that a prison sentence was the only option for the court.
"He accepts there is a drink and drug problem in the background which he intends to address during the period in custody," he said.
Gibson was put on the sex offenders' register.