A rapist sent a message to his schoolgirl victim saying sorry for forcing himself on her following the attack.
Bilaal Afzal, 25, was jailed for five-and-a-half years at the High Court in Edinburgh on Friday.
He took the 16-year-old to an apartment after first trying to sexually assault her at Holyrood Park in the capital.
Afzal pushed the girl onto a bed and then sat on her while she struggled before carrying out the sex attack.
He later sent her a text message apologising, but during his trial insisted the victim consented to sex.
During sentencing, judge Lord Uist told Afzal: “You first attempted to assault her sexually in Holyrood Park before driving her to Lochend Apartments where you had arranged to have an apartment and raping her there.”
Afzal denied assaulting and raping the girl in April 2018 and claimed she was “enjoying” the sex, but his victim was adamant she hadn’t consented.
The teenager told the trial she had contact with him through the social media network Snapchat.
She said he took her for a drive before arriving at the apartment. She told advocate depute Alan Cameron that she was left feeling “sick”.
Afzal, who worked in his father’s shop, admitted sending a message two days later saying he was sorry for forcing himself on her and said: “I thought that’s what she wanted to hear from me.”