Anthony Gibson, 23, warned his victim that she better have "a good lawyer " 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 teenager 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 ten 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 said that he was clearly not remorseful or ashamed, and told Gibson that he would have faced an eight-and-a-half year sentence for the crime had he not pleaded guilty.
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, of Medwin House North, admitted raping the girl at a hostel in the city in August this year after attempting to kiss her, pushing her on to 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 said.
"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 now has trust issues with men."
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 other's bedrooms.
Ms Di Rollo said: "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.
After finishing raping her, Gibson "acted as if nothing had happened", according to his victim. He stood beside a mirror and had another drink.
Defence solicitor advocate Jim Stephenson said Gibson accepted that a prison sentence was the only option. "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.